rmuir commented on code in PR #11857: URL: https://github.com/apache/lucene/pull/11857#discussion_r997318423
########## lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/Hunspell.java: ########## @@ -614,11 +617,27 @@ private void doSuggest( Runnable checkCanceled) { Hunspell suggestionSpeller = new Hunspell(dictionary, policy, checkCanceled) { + final Map<String, Optional<Root<CharsRef>>> compoundCache = new HashMap<>(); Review Comment: can we add a code comment above the map maybe? to me, looks like this is a cache on a per-query basis essentially? due to how compounds get decomposed internally we'll do a bunch of redundant work otherwise? but an unbounded cache looks scary as hell, if you look at any code for the first time? :) -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org