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

[Customer History] Performance woes #777

Closed
emptyrivers opened this issue Dec 12, 2024 · 1 comment
Closed

[Customer History] Performance woes #777

emptyrivers opened this issue Dec 12, 2024 · 1 comment
Assignees

Comments

@emptyrivers
Copy link

TL;DR for folks looking for a solution - try clearing all customer history, and setting the auto-clear to be more aggressive.

Allowing the Customer History to grow too large causes intolerable performance problems when opening the Profession UI, even if the customer history module is not displayed.

This problem was measured using /perfy run OpenProfessionUIToSkillLine(2879) (on a character with Khaz Algar Jewelcrafting, of course):

baseline - 46,162 microseconds

craftsim_openProfPane cpu

baseline was measured after months of semi-religiously performing crafting orders on several characters mainly for knowledge points. During this time, patron & player orders were recorded, and auto-cleanup threshold was set to zero (i.e. disabled)

after clearing all history - 790 microseconds

craftsim_postclearALL cpu

You can actually see much of this flamegraph in the above one, it's just squeezed very tightly on the margins. In any case this almost completely solved the problem for me. There's still a very minor hitch on opening the tradeskill ui, but nowhere near as bad (and no wonder, given a ~98% reduction in the objective!)

after clearing history, then fulfilling a single crafting order - 797 microseconds

craftsim_oneRecord cpu

Very nearly the same as before. Subjectively, this felt identical to a fully cleared history.

Some other notes:

  • even when the entire customer history data is cleared, building the customer history UI seems to take some 280 microseconds, which seems like a long time to build a UI which displays no data.
  • looking closely at the single record display suggests that the marginal cost 1 record on for UI:UpdateDisplay is 80 microseconds. If we take that as ground truth and extrapolate, then the baseline flamegraph suggests that there were approximately 548 records in my saved variables. Unfortunately I didn't think to make a copy before clearing history so I can't confirm, but that at least passes the sniff test for me, considering how I was using the addon over the last few months.
@derfloh205
Copy link
Owner

thank you for this indepth analysis! I think I already have some kind of issue here regarding the customer history performance
#651
I will reference your comment there for future dev work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants