Last Comment Bug 722315 - Increase Firefox startup speed by ~5% (-76ms) on Windows by lazy loading CLSID_DragDropHelper
: Increase Firefox startup speed by ~5% (-76ms) on Windows by lazy loading CLSI...
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: unspecified
: x86_64 Windows 7
-- normal (vote)
: mozilla13
Assigned To: Brian R. Bondy [:bbondy]
: Jim Mathies [:jimm]
Depends on:
  Show dependency treegraph
Reported: 2012-01-30 07:21 PST by Brian R. Bondy [:bbondy]
Modified: 2012-02-02 08:08 PST (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1. (5.32 KB, patch)
2012-01-30 07:21 PST, Brian R. Bondy [:bbondy]
jmathies: review+
Details | Diff | Splinter Review

Description User image Brian R. Bondy [:bbondy] 2012-01-30 07:21:53 PST
Created attachment 592708 [details] [diff] [review]
Patch v1.

When profiling nsWindow.cpp in Windows I found that enabling drag and drop uses ~70ms on app startup.

> NAME: nsWindow::EnableDragDrop 
> Count: 3 
> Total: 0.076:01
> Min: 0.000:00
> Max: 0.076:01
> Average: 0.025:33
> App start time until first paint: 0.890:00

Upon further inspection this all comes from nsNativeDragTarget and in particular: 

> CoCreateInstance(CLSID_DragDropHelper, NULL, CLSCTX_INPROC_SERVER,
>                  IID_IDropTargetHelper, (LPVOID*)&mDropTargetHelper);

mDropTargetHelper isn't needed though until a drag actually happens.
For that reason we can lazy load it instead and save the complete 76ms from startup.
Comment 1 User image Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-01-30 07:33:33 PST
Comment 2 User image Brian R. Bondy [:bbondy] 2012-02-01 06:32:27 PST
Comment 3 User image Ed Morley [:emorley] 2012-02-02 08:08:24 PST

Note You need to log in before you can comment on or make changes to this bug.