Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] increase speed of archive reading #2723

Open
afterdelight opened this issue Jul 1, 2022 · 5 comments
Open

[FEATURE REQUEST] increase speed of archive reading #2723

afterdelight opened this issue Jul 1, 2022 · 5 comments

Comments

@afterdelight
Copy link

increase speed when reading through archive file list. it takes too long and too slow.

@mikf
Copy link
Owner

mikf commented Jul 1, 2022

I personally do not know how to further increase read performance for an archive implemented as an SQLite database, sorry.

Increasing write speeds can be done by setting several different options with PRAGMA statements, but that can potentially lead to slower reads:

PRAGMA journal_mode = WAL
PRAGMA synchronous = NORMAL 

Are you sure that it is actually database reads that are slow, and not anything else like unnecessary network requests or --sleep timeouts?

@AlttiRi
Copy link

AlttiRi commented Jul 1, 2022

PRAGMA journal_mode=WAL;

can increase the speed of writing. Significantly. However you will see the difference only if you run multiple instances of gallery-dl at one time.

I think that your suggestion just is wrong about the reading. The only things that can be slow are related to a network.

@AlttiRi
Copy link

AlttiRi commented Jul 1, 2022

how to further increase read performance

Using of a separated table for each service will reduce the DB size, also technically it will slightly increase the speed of reading, since it's O(log(N)), not O(1) .

@Hrxn
Copy link
Contributor

Hrxn commented Jul 1, 2022

how to further increase read performance

Using of a separated table for each service will reduce the DB size, also technically it will slightly increase the speed of reading, since it's O(log(N)), not O(1) .

Just do what I do, use different archive files for different services/sites. At least the one's with heavy usage..
Already supported, just set-up the galley-dl config accordingly..

@afterdelight
Copy link
Author

okay, thank you very muach for the infromations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants