Statuses

The next challenge in bluefish optimization

In Bluefish, Gnome, open source, Programming on December 24, 2010 by oli4444

I’m still playing with the 12Mb XML file. The syntax scanner matches more than a million times on a pattern in this file (1038246 to be precise). Each time we have a match, we store the context stack and the blockstack.The cache structures consume 56Mb and it needs 40Mb of GSequenceNodes.  The items on the stack are refcounted, so their memory consumption isn’t spectacular. There are 221348 blocks in this file, that use 5.1Mb and 570036 context changes that use 8.9Mb memory. But the stack itself is a GList. Actually, we have about 2 Million GList’s here (for every cache item two stacks), and together they consume a whopping 277Mb of memory for this file!!!

What to do: don’t store the complete blockstack and contextstack every time we find a match.That would help to reduce the 277Mb for the stacks. That still leaves the 96Mb for the cache structures and the balanced tree..

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: