CodeWringer / strive-foundryVTT

STRIVE system for FoundryVTT
GNU General Public License v3.0
1 stars 0 forks source link

Performance is bad on actor with many skills and skill abilities #85

Closed CodeWringer closed 1 year ago

CodeWringer commented 2 years ago

Every time a field is updated, the re-render takes up to a second or more. It should be faster than that. This is probably related to the fact that skill abilities are stored in arrays and that the update delta is much larger than it really needs to be.

CodeWringer commented 1 year ago

Upon current investigation, it appears that the view model system is taking up at least half a second on each render. These times must be reduced.

CodeWringer commented 1 year ago

Upon comparison with other document sheets, it appears only actor sheets take this long to render. And it makes sense they would take longer.

An actor sheet loads all its templates and view models up-front. The more embedded documents there are, the longer this takes. But when changing data on one of the tabs of an actor sheet, for example on a skill document, then the user might not currently be interested in the data on their health tab. It is really unnecessary to load the health tab data right away.

Also, very long lists of skills are to be expected. The number of skills on an actor should not affect the loading quite so much.

The following approaches might help mitigate the perceivable performance problem:

CodeWringer commented 1 year ago

See #185