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

"Campaign Survey" API claims I have thousands of attributes

My campaign was lagging unbearably (only for me, the GM) and I installed this script to see what's up. These are the results: As you can see, it claims I have a whopping 19,285 attributes. I'm not using any character sheets. There are no attributes in any character. See: The list goes on to list 0 attr and 0%for every single character. I have manually checked that there are no attributes in anyone. Where are the 19k attributes coming from?
1694871839
timmaugh
Forum Champion
API Scripter
You may not have designated a character sheet, but that's really the interface overlay to the data stored in the firebase database. I'd be interested in what a character looks like, from that perspective, because the Survey script is definitely seeing 121 characters -- so there is data in the db. Can you install the Inspector script and do a deep dive on a character, sharing screenshots? Something like: !inspect --charactername
1694876914
GiGs
Pro
Sheet Author
API Scripter
Since youre a Pro user, you can create a new empty campaign, and transfer those characters one by one, running inspect after each, to see if the attribute count spikes after any of them.
1694877803
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Very odd. The formula used to find the number of attributes is pretty simple:     let attributes = findObjs({         type: 'attribute'     }); Which just finds every attribute in the db. I just tested the script on an old no-sheet test game, and it accurately reported attributes on characters: I have pretty much ignored the script after lazy loading made it much less useful a diagnostic tool. The database queries are still correct, but they are not loaded into browser memory until needed. So the size report is the same, but the performance impact is dramatically reduced. Timmaugh's script is a much more powerful diagnostic tool, so I'll be interested to see what he finds out.
timmaugh said: You may not have designated a character sheet, but that's really the interface overlay to the data stored in the firebase database. I'd be interested in what a character looks like, from that perspective, because the Survey script is definitely seeing 121 characters -- so there is data in the db. Can you install the Inspector script and do a deep dive on a character, sharing screenshots? Something like: !inspect --charactername Here is a dive on a player's character token: Here is a dive on a monster token:
GiGs said: Since youre a Pro user, you can create a new empty campaign, and transfer those characters one by one, running inspect after each, to see if the attribute count spikes after any of them. Good idea. Perhaps I will try a 50/50 method later. keithcurtis said: Very odd. The formula used to find the number of attributes is pretty simple:     let attributes = findObjs({         type: 'attribute'     }); Which just finds every attribute in the db. I just tested the script on an old no-sheet test game, and it accurately reported attributes on characters: I have pretty much ignored the script after lazy loading made it much less useful a diagnostic tool. The database queries are still correct, but they are not loaded into browser memory until needed. So the size report is the same, but the performance impact is dramatically reduced. Timmaugh's script is a much more powerful diagnostic tool, so I'll be interested to see what he finds out. Exactly, which is why I'm so shooketh that I allegedly have 19k attributes.
Update: I checked again today and all the attributes disappeared, so that's solved I guess.
1694967799
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Ah, the tried and true method of fixing things: hope it works later. That was a weird result from the script, glad it seems to be working properly now.