Closed Bug 135505 Opened 23 years ago Closed 23 years ago

Performance - unnecessary calls to see if protocol handler exists

Categories

(SeaMonkey :: General, defect, P3)

x86
All
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: mkaply, Assigned: waterson)

References

Details

(Keywords: perf)

Attachments

(1 file)

During startup, we repeatdly call: http://lxr.mozilla.org/seamonkey/source/uriloader/exthandler/win/nsOSHelperAppSe rvice.cpp#176 for the rdf protocol. On Windows, this is a registry hit every time. Maybe we should shortcircuit RDF or something.
Copying a couple people. Not including sidebar, there are 39 calls to this function during startup, all passing rdf.
damn! we could at least cache the result! can you post a sample stack trace of one of the 39 hits to this check?
Blocks: 7251
Keywords: perf
Function | Part ------------------------------------------------------------------------------------------------------+--------------------------- nsOSHelperAppService::ExternalProtocolHandlerExists(const char*,int*) | NSOSHELPERAPPSERVICE nsExternalProtocolHandler::HaveProtocolHandler(nsIURI*) | NSEXTERNALPROTOCOLHANDLER nsExternalProtocolHandler::NewURI(const nsACString&,const char*,nsIURI*,nsIURI**) | NSEXTERNALPROTOCOLHANDLER nsIOService::NewURI(const nsACString&,const char*,nsIURI*,nsIURI**) | NSIOSERVICE NS_NewURI(nsIURI**,const nsACString&,const char*,nsIURI*,nsIIOService*) | NSRDFSERVICE RDFServiceImpl::GetDataSource(const char*,int,nsIRDFDataSource**) | NSRDFSERVICE RDFServiceImpl::GetDataSource(const char*,nsIRDFDataSource**) | NSRDFSERVICE nsXULTemplateBuilder::LoadDataSources() | NSXULTEMPLATEBUILDER nsXULTemplateBuilder::Init(nsIContent*) | NSXULTEMPLATEBUILDER nsXULDocument::CheckTemplateBuilder(nsIContent*) | NSXULDOCUMENT nsXULDocument::AddElementToDocumentPost(nsIContent*) | NSXULDOCUMENT nsXULDocument::ResumeWalk() | NSXULDOCUMENT nsXULDocument::EndLoad() | NSXULDOCUMENT XULContentSinkImpl::DidBuildModel(int) | NSXULCONTENTSINK nsExpatDriver::DidBuildModel(unsigned int,int,nsIParser*,nsIContentSink*) | NSEXPATDRIVER.OBJ nsParser::DidBuildModel(unsigned int) | NSPARSER.OBJ nsParser::ResumeParse(int,int,int) | NSPARSER.OBJ nsParser::ContinueParsing() | NSPARSER.OBJ CSSLoaderImpl::Cleanup(URLKey&,SheetLoadData*) | NSCSSLOADER CSSLoaderImpl::SheetComplete(nsICSSStyleSheet*,SheetLoadData*) | NSCSSLOADER CSSLoaderImpl::Cleanup(URLKey&,SheetLoadData*) | NSCSSLOADER CSSLoaderImpl::SheetComplete(nsICSSStyleSheet*,SheetLoadData*) | NSCSSLOADER CSSLoaderImpl::Cleanup(URLKey&,SheetLoadData*) | NSCSSLOADER CSSLoaderImpl::SheetComplete(nsICSSStyleSheet*,SheetLoadData*) | NSCSSLOADER CSSLoaderImpl::ParseSheet(nsIUnicharInputStream*,SheetLoadData*,int&,nsICSSStyleSheet*&) | NSCSSLOADER CSSLoaderImpl::DidLoadStyle(nsIStreamLoader*,nsString*,SheetLoadData*,unsigned int) | NSCSSLOADER SheetLoadData::OnStreamComplete(nsIStreamLoader*,nsISupports*,unsigned int,unsigned int,const char*) | NSCSSLOADER nsStreamLoader::OnStopRequest(nsIRequest*,nsISupports*,unsigned int) | NSSTREAMLOADER nsJARChannel::OnStopRequest(nsIRequest*,nsISupports*,unsigned int) | NSJARCHANNEL nsOnStopRequestEvent::HandleEvent() | NSREQUESTOBSERVERPROXY nsARequestObserverEvent::HandlePLEvent(PLEvent*) | NSREQUESTOBSERVERPROXY PL_HandleEvent | PLEVENT PL_ProcessPendingEvents | PLEVENT _md_EventReceiverProc | PLEVENT 0x1E935800 | PMMERGE.DLL:4 nsAppShell::Run() | NSAPPSHELL.OBJ nsAppShellService::Run() | NSAPPSHELLSERVICE.OBJ main1(int,char**,nsISupports*) | NSAPPRUNNER.OBJ main | NSAPPRUNNER.OBJ _start | EXESTRTI 0x1C04C183 | DOSCALL1.DLL:4
Attached patch possible fixSplinter Review
Per mkaply's suggestion. alecf, if you think it would be better to cache failure at a lower level, let's do that instead.
Comment on attachment 77769 [details] [diff] [review] possible fix nope, I think this is just dandy. A one-line comment explaining why you're excluding "rdf:" would be my only request sr=alecf with that
Attachment #77769 - Flags: superreview+
rjc, tingley: r=? (I'll add the comment that alecf suggests...)
Assignee: Matti → waterson
Priority: -- → P3
Target Milestone: --- → mozilla1.0
Status: NEW → ASSIGNED
Keywords: review
Comment on attachment 77769 [details] [diff] [review] possible fix r=rjc
Attachment #77769 - Flags: review+
Keywords: approval
Comment on attachment 77769 [details] [diff] [review] possible fix a=rjesup@wgate.com I'd like to see the explanatory comment added when it's checked in too.
Attachment #77769 - Flags: approval+
Fix checked in, with explanatory comment.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified. I don't see this anymore.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: