uchiha-asha opened a new pull request, #17057: URL: https://github.com/apache/lucene/pull/17057
This change reduces JFlex's default 16,384-char buffer to 2048 in `HTMLStripCharFilter`. Analyzers create a new char filter per field value, so this saves 28 KiB of initial buffer allocation per value. The buffer still grows when needed for long matches. JMH (-prof gc, 2 forks x 6 x 1 s, JDK 25.0.5, shared 4-vCPU cloud VM) Input (one new filter per op) | 16,384 | 2,048 | 1,024 -- | -- | -- | -- 72-char value | 6,399 ns, 35,672 B | 2,162 ns, 7,000 B | 1,770 ns, 4,952 B 4 KB HTML | 63.9 µs, 39,048 B | 59.7 µs, 10,376 B | 46.2 µs, 8,328 B 256 KB HTML | 3.65 ms, 459,682 B | 2.81 ms, 431,004 B | 2.84 ms, 428,956 B 64 KB comment | 496 µs, 35,675 B | 369 µs, 7,003 B | 426 µs, 4,955 B 64 KB attribute in one tag | 375 µs, 494,475 B | 399 µs, 523,195 B | 388 µs, 525,259 B -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
