lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucenenet] theolivenbaum commented on issue #346: Remove Debugging.AssertsEnabled
Date Sat, 17 Oct 2020 17:01:17 GMT

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


   @NightOwl888 : here is the proposed change for this case: https://github.com/apache/lucenenet/pull/372
   
   Would it be fine to just remove this overload of Debugging.Assert completely?
   I've the impression this is probably happening in many other places in the codebase. 
   On a quick glance, there are > 300 usages of this method, and I think it is only truly
save the allocation of a string when running with Debugging.Assert = true.
   
   ![image](https://user-images.githubusercontent.com/8791811/96348670-ca553a80-10aa-11eb-963e-1ab6f685214e.png)
   
   We could also change to use something similar to how [ZLogger](https://github.com/Cysharp/ZLogger)
implemented the zero allocation methods, by just having a couple of different overloads of
Debugging.Assert with generic parameter types, and a call to string.Format()
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message