-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Optimize the function for building database #1612
Comments
For me: I will check the possibility to moving db operations to separate thread with moving to python3 |
70MB? It should be 216MB. I'm running zeronet on HDD not SSD,so it will be slower.Maybe some cache in RAM is needed. Also the data is growing,as i said. |
SSD highly recommended for ZeroNet |
Not everyone would use SSD.And the small file read/write is not HHD good at.So it needs a solution to bypass small file read/write.Also cache the db read/write to file system |
The file reads are cached and a write is handled by the operating system. The db cache is handled by the sqlite module. |
@HelloZeroNet i also have this issue, but 4 times slower in my case to load the .db (24 minutes) + CPU overload. As @blurHY says, not everyone will use HDD. And think about smartphone users.. I found this thread because i wanted to submit the issue about same thing. On mentioned Horizon site, it took my older Pentium computer 15 minutes of full CPU load (HDD activity was not exhausted whole time) to finish rechecking of Horizon site. This is what i did on my Linux Ubuntu 16.04 computer with latest Zeronet: Then i go to ZeroHello and click "Check files" next to Horizon site. Result was like 15 minut CPU overload of the computer, debug.log not went crazy, but i seen in Horizon site (0) menu that the site has 300MB .db cd ~/Apps/ZeroBundle/ZeroNet/data/1CjMsvhJ2JsV4B5qo3FDHnF3mvRCcHuxBn/data
I think this happened to me several times on this site, because in debug-last.log i see: It may be related to unsolved issue where ZeroMe db tooks days to rebuild: ZeroTalk topic, also described in this unsolved issue: HelloZeroNet/ZeroMe#121 |
The problem is it's limited by IO/Sqlite, so we can't do much about it. You can try experiment it by removing some indexes as that's one of the factors of insert performance. |
Then it will be slower to query ? |
It's not necessary going to be slower. Worth experimenting with it. |
1min and 30 secs building after removed all of indexes.And the query seems quicker.Maybe the reason is that the cpu is idle . |
what about making db writes async? that way it at least won't lock up the whole client |
Each time I add this zite ( Horizon) to my poor vps (only have 500MB memery), the zeronet.py program would be killed by the system due to out of memery. |
Is there any way to know that the database has been built? Also show progress bar when the db is building |
rev3594
It takes about 5min to build the database for Horizon.And during building,i can't do anything on zeronet.it just says loading.
The text was updated successfully, but these errors were encountered: