Skip to content

Commit

Permalink
UPDATE deps
Browse files Browse the repository at this point in the history
  • Loading branch information
pubkey committed Apr 7, 2023
1 parent b17c230 commit f5000ec
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
29 changes: 29 additions & 0 deletions orga/performance-trackings.md
Original file line number Diff line number Diff line change
Expand Up @@ -1309,3 +1309,32 @@ performanceResult: 13.83
AFTER3:
performanceResult: 12.86
performanceResult: 12.33




### array-push-at-sort-position

#### reuse length variable

BEFORE:
2.817362993955612ms
2.7930039912462234ms
2.702904000878334ms

AFTER (reuse length variable):
2.5128260105848312ms
2.5788690000772476ms


#### set low-value
BEFORE:
time for "merge sorted arrays": 872.4071319997311ms
compareCounts: 1431962




AFTER (using custom low index):
time for "merge sorted arrays": 847.3687120079994ms
compareCounts: 1261729
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
"@types/simple-peer": "9.11.5",
"@types/ws": "8.5.4",
"ajv": "8.12.0",
"array-push-at-sort-position": "2.0.0",
"array-push-at-sort-position": "3.0.0",
"as-typed": "1.3.2",
"broadcast-channel": "5.0.3",
"crypto-js": "4.1.1",
Expand Down Expand Up @@ -511,4 +511,4 @@
"webpack-cli": "5.0.1",
"webpack-dev-server": "4.13.1"
}
}
}
4 changes: 2 additions & 2 deletions src/plugins/storage-memory/memory-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ export function putWriteRowToState<RxDocType>(
const byIndex = stateByIndex[i];
const docsWithIndex = byIndex.docsWithIndex;
const newIndexString = byIndex.getIndexableString(row.document as any);
const [, insertPosition] = pushAtSortPosition(
const insertPosition = pushAtSortPosition(
docsWithIndex,
{
id: docId,
doc: row.document,
indexString: newIndexString
},
sortByIndexStringComparator,
true
0
);

/**
Expand Down

0 comments on commit f5000ec

Please sign in to comment.