It modified the way of the for-loop in the method parseMetaElements of the class BeanDefinitionParserDelegate form for (int i = 0; i < nl.getLength(); i++) to for (int i = 0, j = nl.getLength(); i < j; i++). It makes you only call the method nl.getLength() once no matter how many times the for-loop used.There are a lot of similar places in this code. I think which should be optimised is: 1.The depth of VM stack can be reduced. 2.Some complicated methods would be waste time to calculate the length. It also can be optimeised.I will modify the for-loop in the project if you identified the optimization

Comment From: pivotal-issuemaster

@ZhZGod Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-issuemaster

@ZhZGod Thank you for signing the Contributor License Agreement!

Comment From: ZhZGod

WHY?The first optimization is wrong. But the second is feasible. Does each loop call the nl. getLength () method once?

Comment From: ZhZGod

How is this suggestion inappropriate? Can you give some reasons? @jhoeller

Comment From: snicoll

Thanks for the PR and sorry it took so long to give you some feedback. We're not keen to process with this, in this particular case, or in the core framework at large. getLength() is cached effectively.