-
Notifications
You must be signed in to change notification settings - Fork 4
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
Saving contest page fails if contest page too big #19
Comments
Another idea: We would have a subpage for each participant, something like Then, the contest page would just include each subpage, doing something like:
This way, we don't lose functionality, and we would hit the problem only if the contributions of one single user hit the 2MB mark. |
Actually |
Another solution: The contest page would have something like:
If the results page grows over 2MB, then the bot should create a second results page (and a third one, if needed), and include them all in the contest page.
|
I like this idea the best, and it is also what @zache-fi has suggested. |
It still could/would hit to the expanded page size limit. |
If that turns out to be a problem, couldn't we just link to the subpages instead of transcluding them? |
Yes, my original idea was just to link to the page. |
You're right, I see now that the post-expand include size is again 2 MB, so we wouldn't gain anything by transcluding the pages. Should we create the subpages every time, or only if we get close to the 2MB mark? |
I think only when we get close to the 2MB mark. In the majority of cases, we don't need to split it, it is only when a contest gets really popular that we need to consider that. |
If the contest page is too big (roughly >2 MB), it will fail to save, and the bot grinds to a halt.
Proposed solution: Make a check for this error; if the error (
contenttoobig
) happens, set a config flag for the current contest (how?) so thattooltip_text
in https://github.com/danmichaelo/UKBot/blob/3e658f5e0bce8fae0da45df3885f847989f086df/ukbot/contributions.py#L316 (which can be relatively huge) is turned into something like "Calculation unavailable"), which should reduce the page size drastically.The text was updated successfully, but these errors were encountered: