Monday, October 2, 2000

Discovered that I created a crasher with form controls after printing: hanging anonymous content off the document (via the binding manager) ended up prematurely whacking the content when a new view gets installed on the content model. Moved the stuff over to the pres shell. Seems to fix the problem.

Spent some time tinkering around with my Perl version of "leak soup" after discovering that hyatt checked in some new leaks.

Tuesday, October 3, 2000

Reviewed hyatt's changes to fix the leaks. Cleaned up my patch for the printing crasher based on dbaron's feedback. scottip found some problems with the thread pane attribute minimization, and I tracked it down to a bug in nsPromiseFlatString. Worked out simple workaround for now. Tried to reproduce a crash in nsXULTemplateBuilder related to atoms, but couldn't.

Wednesday, October 4, 2000

More mail scrolling analysis. Applied changes from evaughan to "smooth" scrolling. Ripped out time spent in content and frame construction (in other words, RDF, XBL, and CSS frame constructor), and am trying to look at what's left over.

Removing all the painting time leaves us with about .5 × .75 = 37% of the total time. Here's how that splits up:

Removing the reflow subtree leaves us with .4 × .37 = 14% of the time.

Based on this, it looks like we either have way too many style rules triggering off of the focus state of the scrollbar, or we're just pushing too much shit down into the style system. Removing this stuff could save us up to 10% of the time spent in page-down mail scrolling.

Argh. It turns out that all the focus and blur junk is coming from the fact that I have to switch windows to actually profile the app! There are only two calls that amount to any significant portion of the time. Doh!

The fact remains, though, that we do fire plenty of style re-resolution when changing the :active state of the scrollbar. Most of the pseudo-rules are coming from ua.css: why would we need this for chrome?

Went two more rounds on bug 53969, incorporating some excellent feedback from dbaron. Starting to feel good about the patch.

scc got his fix checked in to create Substring's from iterators. With that in, I went ahead and changed ParseAttribute() to use iterators, too. Quantify says the speedup wasn't as big as I'd hoped. In the bug I say I expect to see this change pick up about 2.5%; in reality, we move the time from CharAt() inline and pick up a bit of an improvement (maybe just shy of 1%). Oh well.

Poking around, I do see that we're spending an awful lot of time in Compare() (from Rule::LookupSymbol()) trying to figure out if we've got the right variable. We get almost a ten-fold fanout; maybe we should build a little hashtable to avoid this? (The net win is another 1%, tops: I'm seeing this as 1.27% of the time...)

Thursday, October 5, 2000

All-day meeting today. Mostly talked about how to reduce footprint for embedding needs.

Looked a new window creation from the XUL cache. 58% of the time is spent in nsXULDocument::ResumeWalk(). This breaks down as follows. ("Overall" numbers adjusted to reflect total time of opening new window, not percentage of ResumeWalk().)

Had to cheer hyatt up. He felt grouchy and neglected after the meeting.

Friday, October 6, 2000

Collected bloat stats for Linux. Pushed around some layout bugs.

Sunday, October 8, 2000

Checked in fix for the printing bug on the trunk. Still awaiting PDT lovin' for the branch.

Monday, October 9, 2000

Fixed a problem in nsLineLayout::FindNextFrame() that had been festering since I'd nuked nsTextRun. Fixed the problem with nsGfxScrollFrame that was causing 'em not to be recycled. Checked in the fixes for attribute minimization on the trunk.

Poked around a bit at a bug with pseudos: looks like we might be matching text frames. Worked up a patch, but buster took the bug back, as it looks like he may have introduced the regression. Filed a couple bugs tryin' to eat dogfood.

Friday, October 13, 2000

Helped from the peanut gallery with a bad GC problem that turned out to be a slip when jst was fixing some other bug. Took a stab at re-writing radha's patches to make the URL bar history actually roll off names.

Monday, October 16, 2000

Helped radha finish off the patch for fixing the URL bar history, using RDF:Seq and limiting the number of elements that wind up in localstore.rdf. Figured out why you couldn't drag bookmarks into a folder, ended up being an ancient bug in the XUL template builder. Dug around a bug that has to do with a page that's rendered too wide: turns out to be a block-in-inline problem.

Tuesday, October 17, 2000

Fixed a problem with nsXULTemplateBuilder::RemoveMember(): it was being too liberal with respect to the content that it blew away. We needed to walk up the template hierarchy in parallel with the generated hierarchy to detect if something was "really" a member. Checked in change to XUL template builder to use iterators instead of CharAt().

Worked up a fix for clearing history from the prefs panel at claudius' prompting.

Stayed up late tinkering around with libbfd and stuff trying to figure out where all the space in the layout DLL is going, and if it's possible to "fold" function implementations. Mostly just stumbling around source code at this point...

Wednesday, October 18, 2000

Little bit more tinkering with readelf. Brendan and I discovered that 300KB of libgklayout.so is vtables! Wow!

Stayed up late looking at a problem with I18n folders in AIM (Bugscape bug 2856). They just don't work, and I can't figure out why. There are a couple minor problems with nsCAimDataSource, but the root of the problem seems to be in nsXULTemplateBuilder: it's not picking up the right value for the empty attribute, apparently on async notification to the folder. I tried to reproduce using vanilla RDF/XML, but to no avail. Strange...

Thursday, October 19, 2000

Radha's fix for the URL bar history ended up revealing a latent bug because it exercised a heretoforth unused code path in nsRDFXMLDataSource's serializer! Whee! Figured out Bugscape bug 2586: couple of evil NS_ConvertASCIItoUCS2() calls lying around. Checked in the implementation for clearing history onto the trunk.

Friday, October 20, 2000

Spent the day plugging away at ELF analysis. It turns out that even thoug 7% of the symbols point to redundant functions, the redundancy accounts for about 1% of the .text segment in libgklayout.html. I did discover that we've got about 250KB of IID declarations (e.g., iid.123); I presume these are from nsIFoo::GetIID() implementations. Posted a summary of what I found.

Monday, October 23, 2000

Prodded at some heap allocation data for a while. Talked with dougt about analyzing the "leveling off" behavior that he's observing with memory usage in the gtkEmbed program.

Figured out the "real way" to bullet-proof ResumeWalk(); ended up being caused by a botched attempt to bullet-proof a similar bug! Fixed up the patch for clear global history to include bienvenu's feedback. Spent some time looking at the topcrash data, and filed a bug for the RDFServiceImpl crash.

Wednesday, October 25, 2000

Split up tasks for doing this "preliminary memory analysis" with edward.

Thursday, October 26, 2000

Gathered gross dynamic footprint data using gtkEmbed for preliminary memory analysis. Started writing a document.

Friday, October 27, 2000

Followed up on the topcrash bug I filed earlier this week (mostly because heikki filed a another one). I found two more places where we weren't matching RegisterDataSource() calls.

Saturday, October 28, 2000

Some more twiddling trying to collect leak data; not much luck with Boehm stuff. Helped warren et al. untangle the build mess that was PRINTF().

Sunday, October 29, 2000

Finally got the fix checked in for the XUL document bulletproofing. Continued wandering around trying to nail down leaks. I think what I'm going to do is just go with what the bloat log spits out for now, and call it a "conservative estimate" of leaks. I've got a script that runs through incrementally more and more URLs on the buster, and dumps the bloat logs to successive files. I'll figure out how to post-process this somehow. I also want to compare against seamonkey: I'm suspicious that seamonkey isn't leaking as much as gtkEmbed (e.g., possibly because of some broken ownership evil in gtkEmbed).

* * *

Put together a graph that shows shutdown leaks as a function of number of URLs visited. Did some analysis of the "largest libraries".

Monday, October 30, 2000

Long session with vidur, warren, jud going over memory and embedding task list. Late night gathering last-minute data for hamerly's meeting tomorrow. Landed RDF crashproofing on the trunk; hopefully we'll see some good news in a few days.

Tuesday, October 31, 2000

Present memory information. Ran quick-and-dirty profiles on folder switching and sorting for discussion with mailnews guys.