NehanPathan commented on issue #1153:
URL: https://github.com/apache/lucenenet/issues/1153#issuecomment-2764490877

   Hi @NightOwl888,
   I have implemented the changes suggested in this issue to optimize the 
dictionary loading in BigramDictionary and WordDictionary by:
   
   āœ… Replacing ByteBuffer with BinaryReader.ReadInt32() to eliminate extra 
allocations.
   āœ… Using ReadOnlySpan<char> instead of ToCharArray() in methods like Hash1(), 
Hash2(), GetItemIndex(), GetBigramItemIndex(), and GetFrequency() for 
performance improvements.
   āœ… Refactoring code to minimize memory usage and improve efficiency while 
loading dictionary data from disk.
   
   I am now working on automating the dictionary loading tests. However, I have 
a couple of questions:
   
   Should the test files be added directly to the Lucene.Net.Analysis.SmartCn 
assembly to avoid InternalsVisibleTo complications?
   
   If added to the Lucene.Net.Tests.Analysis.SmartCn project, we have two 
options:
   
   Make internal classes public (which is not ideal).
   
   Use [InternalsVisibleTo] with a public key, but generating a strong name key 
(.snk) and including the public key is generally a maintainer's responsibility, 
not a contributor's task.
   
   I’d appreciate your guidance on the best approach to proceed with these 
tests. Thanks!


-- 
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: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to