-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved performance of ViewNavigatorEntryIterator #161
Comments
Wow that's great insight. I will check this in tonight!
…On May 16, 2017 15:33, "4ndyc" ***@***.***> wrote:
Performance of the ViewNavigatorEntryIterator can be boosted by around
20% - 30% compared to the existing implementation by altering it to use
ViewNavigator.getNext() rather than ViewNavigator.getNext(ViewEntry) -
see http://linqed.eu/2017/05/12/convenience-at-a-cost-
comparing-domino-java-apis-performance-oda-legacy-jna/ <http://url>. I've
tested the following implementation, comments etc excluded for brevity:
public class ViewNavigatorEntryIterator implements Iterator<ViewEntry> {
private transient ViewNavigator navigator_;
private transient ViewEntry currentEntry_;
private transient ViewEntry nextEntry_;
public ViewNavigatorEntryIterator(ViewNavigator navigator) {
navigator_ = navigator;
nextEntry_ = navigator_.getFirst();
}
public boolean hasNext() {
return nextEntry_ != null;
}
public ViewEntry next() {
if (hasNext()) {
currentEntry_ = nextEntry_;
nextEntry_ = navigator_.getNext();
return currentEntry_;
} else {
return null;
}
}
public void remove() {
// Not implemented
}
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#161>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ACoex9_vRFnJoYMUAxrOiZkmchgZw0Gqks5r6gfjgaJpZM4NdCsn>
.
|
Although the results still stand, on further investigation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Performance of the
ViewNavigatorEntryIterator
can be boosted by around 20% - 30% compared to the existing implementation by altering it to useViewNavigator.getNext()
rather thanViewNavigator.getNext(ViewEntry)
- see http://linqed.eu/2017/05/12/convenience-at-a-cost-comparing-domino-java-apis-performance-oda-legacy-jna/. I've tested the following implementation, comments etc excluded for brevity:The text was updated successfully, but these errors were encountered: