You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2025/04/13 01:29:52 UTC

[PR] Implement Preferences cache for java hints. [netbeans]

mbien opened a new pull request, #8418:
URL: https://github.com/apache/netbeans/pull/8418

   Some hints are invoked very frequently by the scanner and can be seen as inner loop bodies. Querying Preferences there turned out to be expensive.
   
   Preferences were also used outside of the hint implementation, for example for isEnabled() or getSeverity() queries before invoking the actual hint. This isn't visible in the hint metrics log.
   
   Caching Preferences in the hint context covers both usages.
   
   pink sections mark Preferences queries during hint computation.
   
   ![image](https://github.com/user-attachments/assets/9f7b03df-573c-470d-b392-f40833ec8d59)
   
   with cache enabled they are gone
   ![image](https://github.com/user-attachments/assets/b6ab1417-4e6e-425c-88b3-bae7423f3655)
   


-- 
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: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Implement Preferences cache for java hints. [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #8418:
URL: https://github.com/apache/netbeans/pull/8418


-- 
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: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Implement Preferences cache for java hints. [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #8418:
URL: https://github.com/apache/netbeans/pull/8418#issuecomment-2803314276

   although this seems to work fine, this is not as clean as it should be IMO. Low level code like hints would ideally have an immutable copy of the hint settings, instead of having to query mutable configuration directly.


-- 
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: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists