CraftBook 3

CraftBook 3

139k Downloads

Craftbook IC's taking up a lot of CPU time.

LadyCailinBot opened this issue ยท 19 comments

commented

CRAFTBOOK-2910 - Reported by Kainzo

The visualVM snapshot below is the information I have from a 2-3 minute visualvm cpu snapshot. In this area, it tells that Craftbook is using a massive amount of the main thread resources. Are there any fixes for this?
https://www.mediafire.com/?b3stzz5z9vcfs5j

commented

Comment by Kainzo

Alrighty - I really don't know how our setup could be any different, if you need to see any of our stuff, let me know, ill provide any info I can.

commented

Comment by Kainzo

Also looks like the last build failed - I'll wait for the latest build to pass before downloading and testing.
Last compilation failed

commented

Comment by me4502

That was just a unit test issue. I've fixed the test.

commented

Comment by me4502

Are you able to test a more recent version and tell me if the issue still occurs? + New profilings if possible?

commented

Comment by Kainzo

Still seeing craftbook taking up 9% of the cpu over 30-45s of monitoring.
https://www.mediafire.com/?7wc5y9qag16uydb

commented

Comment by Kainzo

http://pastebin.com/PRisa61w - is the /cb report -ip

commented

Comment by me4502

Try the next build. It seems that the slowest part was checking if signs are equal when update is called on them. I've made the check not check for variables, as that shouldn't be a required check at that stage.

commented

Comment by Kainzo

Will do!

commented

Comment by me4502

Thanks, it seems that it seems that I'm shaving off the most intensive part each time, and there is just a slightly less intensive part behind it. This one however, could potentially speed up a lot over the entire plugin when a lot of variables are in use.

commented

Comment by Kainzo

http://pastie.org/private/xjazazmxzoh8infmcvjdbg

Making sure you saw this error - I believe its related to something that was changed.

commented

Comment by me4502

The build only works on 1.7

commented

Comment by me4502

Okay, turns out Spigot culled half of its libraries. Next build fixes it.

commented

Comment by me4502

Do the timings still show lag?

commented

Comment by me4502

Are you able to provide CPU profilings and timings on the latest CraftBook dev build?

commented

Comment by me4502

Please provide screenshots of the profilings, I can't view those files ATM.

commented

Comment by Kainzo

VisualVM -> load snapshot (.nps)
However, here is a screenshot.
http://i.imgur.com/BfYr9GY.png - its currently taking 15-20% cpu time, and is by far the highest cpu plugin at the moment other than entities/etc that is normal.

commented

Comment by Kainzo

K - after testing latest, it looks like it's still ticking 15%
http://i.imgur.com/wvd4L1Y.png

Doesn't seem to have changed at all.

commented

Comment by me4502

I'd probably start looking into why containsKey is taking so long for you

commented

Comment by me4502

Try the next build.. I replaced containsKey with get, and just checked for null. Although this should very likely actually contain the key, and in this case very rarely will... This may speed it up, and may be the reason it takes so long for you.
I also reverted the last build... It seems that toString is slow for Events.