NightOwl888 commented on issue #346:
URL: https://github.com/apache/lucenenet/issues/346#issuecomment-697248229


   > 10% performance penalty isn't wroth to be java compliance
   
   Where do you see a 10% performance penalty?
   
   Running a basic search using the SearchFiles demo project as a template (see 
#306) shows virtually no impact in search speed and about a 1.5% increase in 
RAM usage.
   
   On the other hand, the IndexFiles benchmark has about a 4% decrease in 
performance and a 23% increase in RAM consumption.
   
   Run your own benchmarks on 4.8.0-beta00012 vs 4.8.0-beta00011, I am 
interested to see if you are getting different results.
   
   The problem here is that there seems to be a lot of focus on the *initial 
request* that loads the `IConfiguration`, which is a single hit that happens 
once at startup. It is expensive, but it doesn't happen during normal 
operation, you only notice it if you are continually stopping and restarting 
the AppDomain.
   
   > in this case I strongly feels that move this to #IF TESTING is better 
option,
   you still have the whole functionality, you can run all the tests in 
release/debug and get the same behavior.
   
   We just migrated from what is effectively that approach (using 
`System.Diagnostics.Debug.Assert()`). Too many shortcomings to make it work 
effectively, and we were getting false positives as a result. Not to mention, 
there are some test features that need to be *hard coded* to run in production 
in order to make the tests work that aren't necessary in production. At least 
with this feature, we can now turn them off.
   
   > but why should we stick to the java bad pattern implementation?
   
   I will tell you exactly why - unless we run all of the test conditions (and 
make no mistake about it, the asserts are intended to be *test conditions*), we 
have no way of realistically determining if the application is functioning 
correctly as it was designed.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to