-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize the entity permission to permit mappings (#1642)
* Optimize the entity permission to permit mappings In some cases, when a large number of entities are processed for permission to permit mapping, the code would just hang without indication of what went wrong. At least 2 `yield` would be needed to process each entity. Over the course of 1000+ entities, the 2000 `yield` calls seem to cause problems. The mapping code has been optimized to allow using a lookup cached version. Now only a single `yield` is required. The change allows 1000+ entities to be processed successfully. Signed-off-by: Scott J Dickerson <[email protected]> * Setup `curryEntityPermissionsToUserPermits()` Move from using `.cached()` to `curryEntityPermissionsToUserPermits()` to make the form more explicit. Fixed up the jsdoc on the util functions. Signed-off-by: Scott J Dickerson <[email protected]> * Minor changes - fix typos in docs - remove debug params in various places - add curried permit mapping to `entityPermissionsToUserPermits()` - use a consistent name of the curried function Signed-off-by: Scott J Dickerson <[email protected]> Signed-off-by: Scott J Dickerson <[email protected]>
- Loading branch information
Showing
4 changed files
with
57 additions
and
24 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
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