[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools] Re: StructuredTextEditor consumes huge amount of memory

Ying,

Have you measured how much space is used by just plain old DOM to represent this file? Keep in mind that the file is read into a text buffer where each character takes two bytes but on disk it's likely taking just one byte, so that makes ~4M grow into ~8M, and you've not build a DOM structure for it yet. DOM elements and attributes take a lot of space. Even a java.lang.String with a single character takes roughly 30 bytes to represent, so that's like a 30 times growth (albeit it at an addition character causes only two bytes of growth). In the end, it doesn't seem so surprising to me you should see so much growth...


Ying wrote:
Hi All,

We have a multi-page editor that uses StructuredTextEditor as an embedded page to display the source. However, we are experiencing a high memory usage problem when opening a large (>4M) XML file. We tried to open the same XML file in RAD (7.0.0.5) and noticed that the StrcturedTextEditor uses close to 80 meg of memory. We understood that opening such a large file probably requires quite a bit memory but still feel shocked.

Has anyone experience the similar problem? Any suggestion?

Ying