CoreNetwork / Mantle

The main plugin powering majority of features on Flatcore
1 stars 1 forks source link

Hydration is using too much CPU #318

Closed riddle closed 9 years ago

riddle commented 9 years ago

Last time I tested it was 18%. We need a solution to bring this back, lower Nether is too safe currently and people are deciding to build bases there not on the surface.

matejdro commented 9 years ago

Do you still have pic from hydration CPU test?

riddle commented 9 years ago

I never saved it. It was actually 13%. I used warmroast to profile.

http://builds.enginehub.org/job/warmroast?branch=master

matejdro commented 9 years ago

It looks like problem is similar to what we had with TradeCraft. Is it OK if I move saving hydration to world save event instead of saving on every change?

riddle commented 9 years ago

Please do! I also think that actually checking / changing hydration value can be done way less frequently. Once every 1-2s is OK.

matejdro commented 9 years ago

It is once every 1s.

matejdro commented 9 years ago

It should be much better now. One important note though, you have to delete old hydration table before deploying (Since it was not in use I thought this is much better solution than messing in code to delete it automatically).

riddle commented 9 years ago

@matejdro Are we talking about table in the DB?

matejdro commented 9 years ago

yes