See news://news.mozilla.org:firstname.lastname@example.org and followups, notably news://news.mozilla.org:email@example.com news://news.mozilla.org:firstname.lastname@example.org As a result of the delayed initialization of the history db, someone who tries to access it as a "regular" datasource will see it as empty unless they happen to call GetTargets(). Other nsIRDFDataSource methods -- or at least GetAllResources() -- should probably call OpenDB() to prevent this. Any fix for this will need to be looked at carefully to make sure we don't get a startup time regression by opening the database too early.
Blake is not likely to work on this; a real owner is needed...
yeah, the reason for the delay was to speed up percieved startup. We can probably just put the lazy OpenDB call in each nsIRDFDataSource method...but like you say, we probably have to be careful to make sure none of these things ARE called at startup (but if they are, we should probably fix the callers instead)
Taking from Blake for now.
Assignee: blake → tingley
Created attachment 140476 [details] [diff] [review] patch This implements alecf's suggestion of adding OpenDB calls to each of the nsIRDFDataSource methods that touch the RDF arcs themselves (ie, not for AddObserver, etc). I've verified that this doesn't cause the history to be loaded on startup.
Comment on attachment 140476 [details] [diff] [review] patch r=bzbarsky, I guess... this isn't really code I know that well, though.
Attachment #140476 - Flags: review?(bz-vacation) → review+
Comment on attachment 140476 [details] [diff] [review] patch seems like the right thing. OpenDB is smart enough not to open the database twice... sr=alecf
Attachment #140476 - Flags: superreview?(alecf) → superreview+
Fix checked in.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.