Closed Bug 421513 Opened 17 years ago Closed 16 years ago

Implement lazy statement initialization

Categories

(Toolkit :: Storage, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ondrej, Assigned: sdwilsh)

Details

(Keywords: perf, Whiteboard: [needs patch][swag 2hr])

Attachments

(1 file)

It is preferable to prepare a statement once and execute many times. This can, however, lead to increased Ts time. As you can see in bug 364272, preparation of statements in nsNavHistory::Init accounts for 0.41% of the startup time. A simple solution for this problem would be to modify mozStorageStatement in such a way that the actual preparation will be done when necessary - before the first execution of the statement or before binding parameters. This could break some existing code which is for example reading from non existent table and if this fails, it creates the table. So I guess that we should be explicit and have something like InitializeLazy and use it. The cons of this is that after check-in of this bug we will need additional effort to see Ts improvement.
Flags: blocking1.9?
Keywords: perf
OS: Windows XP → All
Priority: -- → P1
Hardware: PC → All
Whiteboard: [needs patch][swag 2hr]
Target Milestone: --- → mozilla1.9beta5
Attached patch v0.1 (deleted) — Splinter Review
Work in progress. This doesn't link, and I'm not immediately sure why. I won't work on this until I get some other bugs fixed, so feel free to run with it.
Flags: blocking1.9? → blocking1.9-
Priority: P1 → --
Target Milestone: mozilla1.9beta5 → ---
Talking with dietrich, previous test results showed that this didn't actually buy us anything.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: