- marked as enhancement
Multi thread/async database loading
Currently the database loading is slow and use only one CPU core.
It would be better if the plugin load the database with multiple CPU cores.
Kreatív > Loaded 8301808 blocks from database!
Kreatív > Done! Took 365462ms
Comments (9)
-
Account Deleted reporter -
repo owner Yeah, it takes a lot of time to load that many blocks. I’ll see what I can do.
-
repo owner Issue
#86was marked as a duplicate of this issue. -
repo owner I’ve been sitting on that issue for a while now and I’ve concluded the following.
The time it takes to load blocks from the database depends on what else the server is doing at that moment. I had a literal 10x difference in loading time depending on whether or not I had a few other plugins installed. This means that a) I’m doing something wrong, b)
runTaskAsynchronously
isn’t working properly, or c) the server doesn’t use another CPU core for async processing.I did some tweaking and I loaded 175k blocks in 1-1.6 seconds. Put back other plugins and that number jumps to 15 seconds. However, debugging shows that the actual time spent on loading was still 1.6 seconds. Most of the 15 seconds was spent on waiting in line in the Bukkit scheduler to do the actual processing. So, the time RC shows doesn’t tell the whole picture.
I’ll think about it some more and get back to you.
-
Account Deleted reporter Okay. My database currently store 8618293 blocks, and it load in 439663 ms.
Couldn't this be somehow accelerated?
-
repo owner I can display the time it actually takes to load the blocks and it’ll look much faster, but it doesn’t solve the underlying problem. I believe I can make this better in the next version.
-
Account Deleted reporter Paper fixed this and now load the database very high speed.
-
Account Deleted reporter - changed status to resolved
-
repo owner It’s interesting that it’s faster thanks to them, because the problem shouldn’t be dependent on the server implementation. Nevertheless, I’m glad your issue is resolved.
- Log in to comment