Skip to content

Commit

Permalink
Improve performance of adding strings to a Suffix Tree (mezz#1329)
Browse files Browse the repository at this point in the history
  • Loading branch information
BloodWorkXGaming authored and mezz committed Aug 13, 2018
1 parent f767af9 commit e57a772
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ curse_project_id=238222

version_major=4
version_minor=11
version_patch=0
version_patch=1
3 changes: 2 additions & 1 deletion src/main/java/mezz/jei/suffixtree/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ boolean addRef(int index) {
// add this reference to all the suffixes as well
Node iter = this.suffix;
while (iter != null) {
if (iter.addRef(index)) {
if (!iter.contains(index)) {
iter.addIndex(index);
iter = iter.suffix;
} else {
break;
Expand Down

0 comments on commit e57a772

Please sign in to comment.