Closed Bug 563387 Opened 15 years ago Closed 12 years ago

Cache prepared SQL statements

Categories

(Toolkit :: Places, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: stechz, Unassigned)

Details

Chrome's places code caches SQL statements so that we don't eat the performance hit of creating a statement. Firefox does manual statement caching. Perhaps we could do some automatic caching so SQL statements can stay inlined in code, for readability win. Two drawbacks: 1) Some of our SQL strings are really large, using the SQL strings as a key could have its own performance impact? 2) It's possible to have the same effective SQL with a slightly different string. This leads to two cached values. Performance wise this isn't a big deal, but at a larger scale this could negatively impact memory storage.
we are actually already doing this using StatementCache (And now Sqlite.jsm)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.