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

Opening the database takes a long time. #4

Closed
DaveDavenport opened this issue Nov 13, 2011 · 4 comments
Closed

Opening the database takes a long time. #4

DaveDavenport opened this issue Nov 13, 2011 · 4 comments
Labels

Comments

@DaveDavenport
Copy link

Starting GMPC (that uses glyr) it blocks for little over 2.5 seconds on glyr_db_init.
(compile gmpc with --enable-timings to see timestamps during startup).

-rw-r--r-- 1 qball qball 62M 2011-11-13 11:51 /home/qball/.cache/gmpc/metadata/metadata.db

@sahib
Copy link
Owner

sahib commented Nov 13, 2011

Hello Dave,

Sorry for not being in the chat, im having a flu and some other problems right now.
The long startup time might be due VACUUM that is being performed on loading, or it might be the plain size of the db.
Probably the latter.. guess I have to offer an option to store only paths in the db.
I have very little time at the moment, therefore it might take some time to implement this.. sigh

Will be in #gmpc later the day.

@DaveDavenport
Copy link
Author

don't do a vacuum on each startup, that is not going to speed things up.
See http://www.sqlite.org/lang_vacuum.html why it is so slow (it makes a complete copy off the db).
Large DB's are no problem, vacuuming each startup is!

@DaveDavenport
Copy link
Author

Ok, I removed the VACUUM, this speeds up GMPC startup time. GMPC startup time is back to 160ms. (yes it was a > 15x increase in startup time.)

I think a 'cleanup' function that does it we trip periodically on shutdown would be nicer.

@sahib
Copy link
Owner

sahib commented Nov 13, 2011

Okay, thanks for testing this. Will commit it later.

@sahib sahib closed this as completed Nov 28, 2011
sahib added a commit that referenced this issue May 1, 2012
emillon added a commit to emillon/glyr that referenced this issue May 1, 2012
* master:
  Fixed indentation
  Replaced levenshtein functions in autohelp.c through the API
  Replaced get_next_word with g_strsplit in autohelp.c
  Updated readme a tad sahib#11 (??)
  Updated readme a tad sahib#10 (??)
  Updated readme a tad sahib#9 (??)
  Updated readme a tad sahib#8 (??)
  Updated readme a tad sahib#7
  Updated readme a tad sahib#6
  Updated readme a tad sahib#5
  Updated readme a tad sahib#4
  Updated readme a tad sahib#3
  Updated readme a tad sahib#2
  Updated readme a tad
  Removed silly swig stuff in types.h

Conflicts:
	src/glyrc/autohelp.c
@ansedor ansedor mentioned this issue Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants