You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2023/01/03 14:54:39 UTC

[GitHub] [lucene] mcimadamore commented on pull request #12033: Patch class files for Java 19 code to no longer have the "preview" flag (this enables Java 19 memory segments by default)

mcimadamore commented on PR #12033:
URL: https://github.com/apache/lucene/pull/12033#issuecomment-1369859675

   IMHO it would still be useful to have some kind of flag to disable this. Because of this patch it is effectively no longer possible to run without memory segment in JDK 19 (or later, for future releases). This means that it will be quite tricky to diagnose performance differences caused by the byte buffer <-> memory segment change vs. JDK N <-> JDK N + 1. I also thought that the whole point of only enabling the memory segment index with `--enable-preview` was to give a choice to downstream clients whether to enable or not, and to test this in the real world (so as to provide feedback). Forcing downstream clients to use (indirectly) a preview API is a pragmatic solution, for sure, but also one that loses some of the benefits of the previous approach.
   
   IMHO, if there was discomfort in using --enable-preview before because of enabling of unwanted features (btw, this concern is not baseless (**)), this patch seems to just kick the can down the road: now the discomfort will be directed at whether using JDK 19 as a whole or not.
   
   (**) - Java 19 has other preview features as well, namely Loom. In Java 19 there were some startup regression when enabling Loom. To mitigate these regression, Loom support is only enabled if the `--enable-preview` flag is detected. (AFAIK, this is no longer the case in 20, as the underlying issues have been resolved). So, enabling preview features in JDK 19 *can* result in some performance differences, even if _none_ of the Java 19 experimental features is used. 


-- 
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-unsubscribe@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org