AY2122S2-CS2103T-T09-3 / tp

MIT License
0 stars 4 forks source link

[Test] Application Lagging due to large number of character for comment #283

Closed aweijun closed 2 years ago

aweijun commented 2 years ago

Added a comment with 1046605 characters, causing the whole application to lag.

image

Should we limit the number of characters a comment can have?

ghost commented 2 years ago

Yes i think we should. If not they might bug report this during PE.

JonathanHoshi commented 2 years ago

I tested with 300k characters online at https://charactercounter.com/ with the copypasta i made at https://justpaste.it/3h1bz. What limit should we set for the character count?

ghost commented 2 years ago

If 300k works well then we should just set 300k as the limit. Remember we need to state the limit in UG.

Ardentsoul commented 2 years ago

I agree with kw with regards to this.

aweijun commented 2 years ago

Hi, I was thinking if we should limit this to punctuations and alphanumerics.

arcornior commented 2 years ago

If other characters don't affect the max characters a comment can store I don't think there's a necessity to limit it to punctuations and alphanumerics.

aweijun commented 2 years ago

Hi, I have been testing this my current solution to this bug, at times the certain languages such as Korean would experience issues and not be displayed. I feel that it would be safer to limit it to ascii characters, or alphanumeric characters and punctuations.

ghost commented 2 years ago

Yes i agree, it will be safer to limit it. Remember we had bug reports talking about emoji and Japanese characters, so it's possible they might pull all sort of characters during PE.

JonathanHoshi commented 2 years ago

Sure, if other languages is causing an issue to the application, we should limit it to just be english itself.

arcornior commented 2 years ago

Yep, I had originally tested on Japanese and it didn't cause any issues so I neglected testing Korean. Great job catching this bug!