-
Notifications
You must be signed in to change notification settings - Fork 220
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
CW-375: Excessively long solutions cause performance problems in browsers #3140
Comments
Similar problem was reported on Discord. The root of the issue is most probably very CPU-intensive syntax highlighting which attempts to color tens of thousands of lines with a comment in a browser, freezing it. The user got locked out of the "Solutions" tab on their profile page because their browser froze every time they attempted to see their recent solutions. |
I disagree with the connotations from your wordings that "shorter = more serious". You seem to imply that excessively long solutions are always posted out of comedic/trollish intent; but typical solutions are not long enough to cause browser hiccups, and solutions long enough to cause hiccups are almost always by putting data as code, which says more about the kata's inadequacies. If someone doesn't like solutions are hardcoding data, enforce a code size limit. Trying to discourage this by bullying/harassing solutions doing this by saying bad words about it (yes, this happens a lot) is unacceptable. Anyways, concealing solutions entirely is just ridiculous, it categorically discriminates long solutions for being long by putting a bad light onto them ("look how long solutions is concealed by default, they're clearly Bad:tm:!"). "Clever" button is already used by lots of users to discriminate solutions they don't like, so please don't add more such inconsiderate features. Please make sure any solutions of this is universal across all solutions and doesn't cause potential discrimination, such as
|
It looks like there's something about highlighting that Chromium doesn't like. Firefox loads huge solutions in under a minute on an old PC where a minute seems a more or less acceptable time for that (comparable to discourse pages with a lot of comments), while Brave hangs forever. |
Discussed in #3108
Originally posted by kirillFedorov1 November 28, 2023
Consider concealing solutions that are excessively long, such as those that span thousands of lines and are often submitted as "funny" solutions. These submissions can cause significant performance issues, freezing web browsers and creating a frustrating environment when attempting to view other, more serious solutions.
For instance, after completing the kata You can't code under pressure #1, I encountered an issue where my laptop was unable to load the solutions page at all.
The text was updated successfully, but these errors were encountered: