[
https://issues.apache.org/jira/browse/SLING-10969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454106#comment-17454106
]
Konrad Windszus edited comment on SLING-10969 at 12/6/21, 4:07 PM:
-------------------------------------------------------------------
Fixed in
[https://github.com/apache/sling-org-apache-sling-models-impl/commit/6a10f5640b276eb36d08c304cbdb3bd27b44010c.]
Thanks for the PR [~paul.bjorkstrand]!
was (Author: kwin):
Fixed in
[https://github.com/apache/sling-org-apache-sling-models-impl/commit/6a10f5640b276eb36d08c304cbdb3bd27b44010c.]
Thanks for the PR [~paul.bjorkstrand]!
> Remove synchronized & rest of accessible flag during injection
> --------------------------------------------------------------
>
> Key: SLING-10969
> URL: https://issues.apache.org/jira/browse/SLING-10969
> Project: Sling
> Issue Type: Improvement
> Components: Sling Models
> Affects Versions: Models Implementation 1.4.16
> Reporter: Paul Bjorkstrand
> Assignee: Konrad Windszus
> Priority: Major
> Fix For: Models Implementation 1.5.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> To improve multithreaded performance of Sling Models, the {{synchronized}}
> blocks, along with the "reset" of the {{setAccessible}} using its original
> value should be removed.
> Context:
> The synchronized blocks were added to resolve a race condition [1]. After
> looking into another large project that uses reflection to access members of
> classes (Felix [2]), nowhere in that project is something similar being done.
> Every reflective access is just doing {{setAccessible(true)}}.
> Results from a JMH test allude to a significant performance improvement
> during multithreaded threaded access by removing the synchronized (JMH
> results [3]).
> [1]: SLING-6584
> [2]: https://github.com/apache/felix-dev/search?q=setAccessible
> [3]: https://gist.github.com/paul-bjorkstrand/f3bb154665e7d2168b4656eb7b794496
> [4]: https://www.mail-archive.com/[email protected]/msg113123.html
> [5]: https://github.com/apache/sling-org-apache-sling-models-impl/pull/11
--
This message was sent by Atlassian Jira
(v8.20.1#820001)