forked from heardrwt/RHAddressBook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bunch of speed improvements for initial addressbook record accesses.
We now maintain a weak lookup map from recordRef to RHRecord instances. We also maintain a weak map from recordID to RHPerson objects. With both these optimizations, we end up with a 28x speedup for the first call to people and 17x for subsequent people calls. STATS: //Original PERF: Init took 0.445754 seconds. PERF: First people call took 4.762057 seconds. (for 5000 people) PERF: Second people call took 0.554423 seconds. (for 5000 people) //With Both PERF: Init took 0.462656 seconds. PERF: First people call took 0.166239 seconds. (for 5000 people) PERF: Second people call took 0.030911 seconds. (for 5000 people) //With ID Map Only PERF: Init took 0.453450 seconds. PERF: First people call took 1.004441 seconds. (for 5000 people) PERF: Second people call took 0.919334 seconds. (for 5000 people) //With Ref Map Only PERF: Init took 0.499064 seconds. PERF: First people call took 5.689294 seconds. (for 5000 people) PERF: Second people call took 0.050356 seconds. (for 5000 people)
- Loading branch information
Showing
3 changed files
with
216 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.