Skip to content

Conversation

janro1
Copy link

@janro1 janro1 commented Nov 16, 2018

Hi,

we see very high numbers of exceptions under heavy load on author and publish instances because of the way getField is implemented. As every of our models is written in java bean style with getters and setters, we decided to inverse the retrieval order for properties from field first to method first. This has dramatically reduced the amount of exceptions generated (around 200.000 per minute in our case) and improved the render performance up to 10%.

As invokeBeanMethod does not generate an exception if the method is not found the performance impact for models which rely on public field access should not be that big.

@npeltier
Copy link
Contributor

@janro1 @raducotescu sorry i didn't see this before my PR (#3 ) ! my measurement on we.retail and some pages is ~20%
note that both our changes are not mutually exclusive, and i guess it makes sense checking method first

@raducotescu
Copy link
Member

I'm reluctant in applying this PR since it might introduce backwards incompatible changes, assuming a class will have an accessible field with the same name as an accessible method.

PR #3 should have already improved performance quite a lot. @janro1 / @npeltier, could you please measure again with the latest snapshot?

@raducotescu raducotescu self-assigned this Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants