Closed
Bug 470865
Opened 16 years ago
Closed 16 years ago
Can GetService() be made faster?
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: taras.mozilla, Unassigned)
References
Details
Attachments
(1 file)
133.87 KB,
text/plain
|
Details |
bsmedberg informed me that caching results of code like Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties) is considered bad practice. However according to my measurements getService() takes > 0.3ms per invocation on N810(down from 0.6ms once bug 470859 is landed).
Seems that calling GetService from C++ is fast, but when called from JS the overhead of calling GetService is 10x greater that the call itself.
Reporter | ||
Comment 1•16 years ago
|
||
This is a profile of calling getService() in a loop.
Reporter | ||
Comment 2•16 years ago
|
||
When built with --with-kuser getService() overhead on n810 is similar to other xpconnect calls: 0.2ms
Reporter | ||
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•