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

Found a pre-defined key order!

1674339590

Edited 1674339617
Hi I'm developping my own character sheet, and it has evolved quite a bit since a year Now, when i initialize a new character sheet, there is no problem specifically, only 2 lines shows of "Found a pre-defined key order!" at each action, and it doesnt feel slow But on old sheet my player uses, there is like 52 lines of "Found a pre-defined key order!" on each action and the sheet feel awefully slow I've pinpointed down through some google research that it might come from repeatable sections I've tested with a button to display my sections ids and look for doubles or things like that but i don't find any of that Can someone help me to find a way to fix that ? i've tried to transmogrify the sheet and the problem persist too :/
1674340217

Edited 1674340258
GiGs
Pro
Sheet Author
API Scripter
You'll need to show the code for that repeating section. Though if you are getting 52 lines of errors, it might need a lot of cleaning up.
i have many repeating sections and i can't pinpoint which one is the problem ... i'm looking for a way to investigate x)
1674341111
GiGs
Pro
Sheet Author
API Scripter
Can you just get your player to use the newer sheet?
No, it's all on the same sheet. When i create a new one and "initialize" like i do actually, i have no issue. But when some player use their sheet, they have these error, but not the same amount. I tried to copy a sheet and manually delete all of what is in the repeatable_sections, and the problem persist ...
I can show you the character sheet but there is like 22000 lines ^^'
1674343727
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This is not an error. It's a log that frankly probably shouldn't be exposed to the public. As far as I can tell, it just means that you've manually rearranged items in a repeating section. Regardless of what it's actually for, you can safely ignore it.
1674344037

Edited 1674344859
Oosh
Sheet Author
API Scripter
'Found a pre-defined key order' (which said 'Foudn' for years and was only fixed recently... it looks strangely wrong spelled correctly) log is from a repeating section grabbing the key order - this means either a repeating section has been rearranged, or an action happened on a repeating row which has been reordered. That in itself isn't an issue (the log line is not an error), but if you're seeing a correlation between the number of 'key order' log lines, and the slowness of the sheet, that's a pretty solid red flag that you have some nasty inefficiencies in the sheetworkers for that repeating section. The prime culprits would be setAttrs or getAttrs calls inside a loop, but you'd need to show the code for that section for anyone to be able to assist. The number of lines logged of 'Found a pre-defined key order' tells you how many attributes are in the repeating section up until the last re-ordered row (so if you've dragged the first row all the way to the bottom, it should be the total number of attributes in that section.... I think). Edit - Groch said: I can show you the character sheet but there is like 22000 lines ^^' Just the code relevant to the repeating section where the problem is. 22K lines certainly gets alarm bells ringing, if this isn't the most complicated game system ever devised, or you have loads of comments :) edit 2 - A packed inventory on a 5e sheet could easily generate over 1K log lines with each change made to the section - so the internal function itself definitely isn't the issue.
1674344418
GiGs
Pro
Sheet Author
API Scripter
Oosh said: The prime culprits would be setAttrs or getAttrs calls inside a loop, but you'd need to show the code for that section for anyone to be able to assist. That seems very likely!
Well, as i've said i have troubles finding where they come from, but you pointed something interesting. After deleting all the lines in every repeatable sections, i still have the 52 lines of "Found a pre-defined key order!" in the sheet i'm testing atm, but it isn't slow anymore ! The lines appear even if i change "tabs" with input type="radio", but as you said it's not these lines that slow everything ... Investigating further ! Oosh said: Just the code relevant to the repeating section where the problem is. 22K lines certainly gets alarm bells ringing, if this isn't the most complicated game system ever devised, or you have loads of comments :) It's a sheet for Exalted 3e, with a lot of automatisation and reminders of attrs&charms on some tabs, so there is a lot of lines involved as roll20 doesnt use a templating system (i had to copy/paste a lot for every charm type)
i don't have any bind on the attr used for the tab selected, so i can't figure out why it is slow i've deleted as much input [disabled] as i could, but some player sheet feel fast and some feel slow
1674347104
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The log is just a boot up log from the sheet saying that it found repeating sections that were manually ordered. I don't think it runs on a get/setAttrs.