Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid primary contact lookup when redundant
This is a very minor performance tweak to avoid an unnecessary PouchDB.get() for a place's primary contact when the document is already in the place's children. In my limited exposure to project data, the primary contact is often a child of the place. Looks like the in-memory lookup is ~0-1ms and PouchDB lookup ranges from 10-45ms. Not impressive... but I'm here cause it's on my list, and it doesn't add much compexity. Very open to just closing this as won't fix due to insufficient gains. "The data fetched in right-panel step R6 was already fetched in step R4. Can we consolidate?" from #4445
- Loading branch information
1 parent
919a270
commit 72ccf5a
Showing
2 changed files
with
39 additions
and
19 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