mirror of
https://github.com/discourse/discourse.git
synced 2025-03-15 21:46:04 +08:00

Every time we type a letter the composer issues a reply length check. This is due to the interconnecting components, the title one depends on the body which means that this decision making is passed along each time, even if the title does not need it strictly. Anyway... This optimisation has 3 parts: 1. If the composer string is super long (10000 chars) we will bypass, quote stripping and space squashing. 2. Quote stripping is now done much more efficiently, we strip them all in one go 3. Space squashing eg: `hello world` to `hello world` is done in an efficient loop to avoid needing to generate superflous strings that need GC