Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mylar-dev] [performance] refactor AbstractApplyMylarAction#installInterestFilter/uninstallInterestFilter(StructuredViewer)

There is performance isssue in below for statement
for (int i = 0; i < viewer.getFilters().length; i++)

This is because viewer.getFilters() is heightweight method and we can use below statement replace it

for (ViewerFilter filter : viewer.getFilters())

In general, I suggest using the for-each statement if it is possible and it can improve performance

 


Back to the top