GM_deleteValue Slow #2025

Closed
TimidScript opened this Issue Sep 25, 2014 · 5 comments

Projects

None yet

3 participants

@TimidScript

If you have a large database and you remove values from it, the process is very very slow and it can hang Firefox if the data content is large. Do you do a compact operation with each delete?

I do not see why the process is so slow.. It's not so bad when adding new large data. Removing or replacing existing data is painfully slow.

@arantius arantius added this to the 2.4 milestone Sep 28, 2014
@arantius arantius modified the milestone: 2.4, 2.5, 2.6 Oct 29, 2014
@arantius
Collaborator

Can you be more objective than "very slow"? How many milliseconds does it take? How many would be few enough to no longer be "too slow"?

@arantius arantius modified the milestone: Pony, 3.3 May 29, 2015
@janekptacijarabaci
Contributor

I would add an index on the 'name' field.
See also https://www.sqlite.org/pragma.html#pragma_cache_size

@TimidScript

I no longer have the script but I remember it was in seconds and not ms. The number of records in the database was in the thousands and some records were pretty large.

@janekptacijarabaci
Contributor
janekptacijarabaci commented Aug 5, 2016 edited

See also:
#2197

After adding this line to GM_[gs]etValue_Bench.user.js:
measure('delete', GM_deleteValue, n);

I propose to close this issue.


See also (I propose to close this issue):
#1212
#1230
#1243
#1247 (AFAIK)
#1300
#1320
#1887
#1936
#2141
#2235 (AFAIK)

@arantius arantius modified the milestone: 3.9, Pony Aug 5, 2016
@arantius
Collaborator
arantius commented Aug 5, 2016

Agreed, this performs reasonably for me after fixing #2197.

@arantius arantius closed this Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment