Open
Bug 165610
Opened 23 years ago
Updated 8 years ago
low hanging perf fruit
Categories
(SeaMonkey :: MailNews: Message Display, defect)
SeaMonkey
MailNews: Message Display
Tracking
(Not tracked)
NEW
People
(Reporter: sspitzer, Assigned: neil)
Details
(Keywords: perf, Whiteboard: see comment 21, 29)
Attachments
(4 files, 5 obsolete files)
21.49 KB,
patch
|
Details | Diff | Splinter Review | |
23.65 KB,
patch
|
Details | Diff | Splinter Review | |
16.37 KB,
patch
|
Details | Diff | Splinter Review | |
1.92 KB,
patch
|
mscott
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
low hanging perf fruit:
1) remove sidebar from ab, hide by default in mail (existing bug)
2) startup page for mozilla, about:blank
3)
function OnLoadMessenger()
{
setTimeout(delayedOnLoadMessenger, 0);
}
function delayedOnLoadMessenger()
{
...
}
4)
// skip these for now, since account central is hidden
// and we are selecting the inbox by default
// and the start page is about:blank
//HideAccountCentral();
//loadStartPage();
<vbox id="accountCentralBox" flex="1" collapsed="true">
5)
if (window.frames["messagepane"].location != "about:blank") {
loadStartPage();
gDisplayStartupPage = false;
}
6)
function ComposeLoad()
{
setTimeout(DelayedComposeLoad, 0);
}
function DelayedComposeLoad()
{
...
}
Reporter | ||
Updated•23 years ago
|
Target Milestone: --- → mozilla1.3alpha
Assignee | ||
Comment 1•23 years ago
|
||
> startup page for mozilla, about:blank
> //loadStartPage();
The start page currently gets loaded twice (once if you start with Account
Central, when you can't even see the start page...), the second time by
commandglue.js, so don't fiddle with the prefs just yet. See also bug 61950.
> // skip these for now, since account central is hidden
> // and we are selecting the inbox by default
> // and the start page is about:blank
> //HideAccountCentral();
You could also remove the call to HideAccountCentral from OpenInboxForServer.
> window.frames["messagepane"].location
Um... this code doesn't exist any more...
And one more you might like: many JS scripts are loaded into arbitrary windows
and never get used - they should be limited to those windows where they are
needed. Then functions only used in 3pane should only be defined in scripts
loaded by 3pane (e.g. commandglue.js, widgetglue.js, msgMail3PaneWindow.js).
Some scripts are even loaded multiple times in the same window e.g.
messageWindow.xul loads commandglue.js twice, but never uses it?
Assignee | ||
Comment 2•23 years ago
|
||
> <vbox id="accountCentralBox" flex="1" collapsed="true">
Actually I did run up against a problem where view headers all would move the
scrollbar vertically off the screen... the only fix I could come up with was to
start up in account central view i.e. collapse everything else instead :-)
Assignee | ||
Comment 3•23 years ago
|
||
System: Pentium 133Mhz 80MB Windows 98 Mozilla Build ID: 2002082908
Total window open time: ~10s, of which 3s is JS code
1. Rewrite PerformExpandForAllOpenServers saves 0.5s (5%)
2. Fix utilityOverlay.js saves 0.1s (1%)
3. Don't include cmd_delete in toolbar updates saves 0.1s (1%)
4. Pre-disable some toolbar commands saves 0.1s (1%)
You could also make the window appear 0.6s earlier by moving
SetFocusThreadPane.
Assignee | ||
Comment 4•23 years ago
|
||
Follow-up to comment #2, there's a bug filed that View/Headers/All makes the
message pane grow, the fix is to add collapsed="true" to the XUL and remove it
(unless the splitter state is collapsed) on startup (and HideAccountCentral
would do this). Unfortunately this would probably force a refliw and slow down
loading.
Assignee | ||
Comment 5•23 years ago
|
||
Here's two more perf fixes: 1. Make all the items in nsIFolderListener.idl
nsIFolders rather than nsISupports, this will save you from having to QI them
back and forth (both C++ and JS). This may apply to other listeners. 2. Don't QI
an nsIFolder to an nsIRDFResource just to get its value, that's just the .URI!
Assignee | ||
Comment 6•23 years ago
|
||
Improved loadStartFolder by not creating RDF resources.
I noticed that showMailIntegrationDialog takes 2% of overall load time;
that seems alot when it doesn't actually do anything, but perhaps it (and
probably SetFocusThreadPane) could be moved to the end of loadStartFolder.
Attachment #97420 -
Attachment is obsolete: true
Reporter | ||
Comment 7•23 years ago
|
||
Assignee | ||
Comment 8•23 years ago
|
||
According to Venkman,
nsDragAndDrop.js is loaded twice
nsTransferable.js is loaded twice
strres.js is loaded twice
commandglue.js is loaded twice
mail-offline.js is loaded twice
mailOverlay.xul is loaded three times?
Assignee | ||
Comment 9•23 years ago
|
||
Oh, I now see that cmd_delete is put in the toolbar update so that the delete
key works... perhaps we can only call UpdateDeleteCommand() when opening the menu.
Assignee | ||
Comment 10•23 years ago
|
||
After rereading the code I see that the mail integration dialog is on a timeout.
Unfortunately it fires before loadStartFolder so there's an ugly delay there.
Also, there's a problem with using SetFocusThreadPane in a timeout (either on
its own or via putting the whole OnLoadMessenger in a timeout) - when the
timeout fires it grabs focus from the current window which if you're impatient
or loading another focus-grabbing window such as Chatzilla results in an
annoying switch.
Assignee | ||
Comment 11•23 years ago
|
||
Added new "virtual" <command id="menuitem_delete"> to handle updating the label
and accesskey of the menuitem so that they aren't updated on every
focus/selection change, and also fixed it so that when focus is in the quick
search or other input then the label reverts back to _D_el, this saves some
focus code in onEvent.
Used XPConnect magic to make IsCurrentLoadedFolder(item) more efficient.
Removed more load event listeners when they fire.
Attachment #97527 -
Attachment is obsolete: true
Reporter | ||
Comment 12•23 years ago
|
||
note, sidebar is gone from mail and addressbook.
Status: NEW → ASSIGNED
Target Milestone: mozilla1.3alpha → mozilla1.2beta
Assignee | ||
Comment 13•23 years ago
|
||
Found an optimization in SelectFolder
Attachment #97957 -
Attachment is obsolete: true
Assignee | ||
Comment 14•23 years ago
|
||
Attachment #99257 -
Attachment is obsolete: true
Assignee | ||
Comment 15•23 years ago
|
||
Attachment #97553 -
Attachment is obsolete: true
Reporter | ||
Comment 16•23 years ago
|
||
not going to happen for 1.2 beta, sliding out.
Target Milestone: mozilla1.2beta → mozilla1.3alpha
Reporter | ||
Comment 17•23 years ago
|
||
sliding out again, so untargetting.
Target Milestone: mozilla1.3alpha → ---
Assignee | ||
Comment 18•23 years ago
|
||
OK, so some of my fixes are wrong, in particular
utilityOverlay.js should use a bubbling event listener
key_delete should not [observe] command="cmd_delete"
There may be also be some scope for minor perf by cleaning up code,
for instance using .hidden instead of etAttribute("hidden"
Reporter | ||
Comment 19•23 years ago
|
||
assigning to neil, he's got plans to tackle this.
Comment 20•23 years ago
|
||
I am a bit at a loss which problems are tackled by this bug and which are
obsolete. Neil, can you summarize which patches you currently plan to provide?
Thank you.
Assignee | ||
Comment 21•23 years ago
|
||
Change event listener in utilityOverlay.js to bubbling instead of capturing
Change event listener in threadPane.js to bubbling instead of capturing
Make key_delete not use command="cmd_delete"
Avoid updating the whole mail toolbar when changing focus
Pre-disable the mail toolbar items that don't immediately apply in the 3-pane
Make the title of the delete menu update more efficiently
Reduce the number of calls to QueryInterface
Remove the duplicate/account central start page load
Optimize PerformExpandForAllOpenServers
Optimize loadStartFolder
OS: Windows 2000 → All
Hardware: PC → All
Comment 22•22 years ago
|
||
Neil, I can review the last two patches.
Assignee | ||
Comment 23•22 years ago
|
||
Well I'd better update them for bitrot then :-)
Assignee | ||
Comment 24•22 years ago
|
||
Some of the stuff will take some time to unbitrot, this is a start although
it's getting a bit late (here) so I haven't actually retested it yet ;-)
Assignee | ||
Comment 25•22 years ago
|
||
Interesting... the folder pane's isCommandEnabled blocks special folders (except
Junk, to work around a bug), then doCommand has special code to handle deleting
special folders...
Assignee | ||
Comment 26•21 years ago
|
||
Crawling the folder tree is quite slow while this should be snappy.
Assignee | ||
Updated•21 years ago
|
Attachment #149411 -
Flags: superreview?(bienvenu)
Attachment #149411 -
Flags: review?(mscott)
Updated•21 years ago
|
Attachment #149411 -
Flags: superreview?(bienvenu) → superreview+
Updated•21 years ago
|
Attachment #149411 -
Flags: review?(mscott) → review+
Updated•21 years ago
|
Product: Browser → Seamonkey
Comment 27•18 years ago
|
||
(In reply to comment #26)
> Created an attachment (id=149411) [details]
> Better fix for PerformExpandForAllOpenServers
>
> Crawling the folder tree is quite slow while this should be snappy.
Neil, this checked in 2004-05-31 04:42. Is this bug fixed, or is there something left?
Assignee | ||
Comment 28•18 years ago
|
||
No. See comment 21 for the full list.
Updated•17 years ago
|
QA Contact: stephend → message-display
Updated•15 years ago
|
Whiteboard: see comment 21
![]() |
||
Comment 29•15 years ago
|
||
Neil says over IRC:
1) is done, 2) is not, 3) is "n/a", 4) is not, 5) is done, 6) is not, 7/8) don't know, 9/10) done, I think
> Change event listener in utilityOverlay.js to bubbling instead of capturing
Done.
> Change event listener in threadPane.js to bubbling instead of capturing
Not.
> Make key_delete not use command="cmd_delete"
N/A.
> Avoid updating the whole mail toolbar when changing focus
Not.
> Pre-disable the mail toolbar items that don't immediately apply in the 3-pane
Done.
> Make the title of the delete menu update more efficiently
Not.
> Reduce the number of calls to QueryInterface
> Remove the duplicate/account central start page load
Don't know.
> Optimize PerformExpandForAllOpenServers
> Optimize loadStartFolder
Done.
So the current ToDo list is:
> Change event listener in threadPane.js to bubbling instead of capturing
> Avoid updating the whole mail toolbar when changing focus
> Make the title of the delete menu update more efficiently
> Reduce the number of calls to QueryInterface
> Remove the duplicate/account central start page load
Whiteboard: see comment 21 → see comment 21, 29
Comment 30•8 years ago
|
||
Need to update this bug, and make a similar one for Firefox and Thunderbird.
You need to log in
before you can comment on or make changes to this bug.
Description
•