Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Slow performance of charsheets setting attributes

1459962259

Edited 1459962498
Lucian
Pro
API Scripter
The 5e Shaped Sheet imports data via a JSON attribute. This is parsed and then a bunch of attributes on the sheet are set, triggering the sheetworkers to distribute the data into all the various subsidiary fields. When setting data for characters with a reasonably large number of attributes, such as a Lich with all his spells, the Roll20 side of this seems to be taking a disproportionately long time.  Currently, it takes between 10 and 15 seconds to produce a list of dirty attributes the first time around, before any of the sheetworkers fire. The changes made by the sheetworkers then trigger more events, in a round that again takes around 10 seconds to produce a list of dirty attributes. There are several more rounds of cascading events after this, and in total, the import can end up taking between 30 seconds and a minute.  For reference, the completed Lich has just under a thousand attributes; the initial round of changes sets around 400 in one go I think. I don't know if that would be considered a lot, but the 10-15 second lag times on detecting each round of dirty attributes seems to be grossly disproportionate to the amount of work being done!
1459962987
Lucian
Pro
API Scripter
Also worth noting that deleting the Lich from the journal also takes ~10 seconds to complete - possibly related to&nbsp;<a href="https://app.roll20.net/forum/post/3210611/attribute-dot-remove-somehow-triggers-sheetworkers-in-unhelpful-fashion" rel="nofollow">https://app.roll20.net/forum/post/3210611/attribute-dot-remove-somehow-triggers-sheetworkers-in-unhelpful-fashion</a> ?