perf: Improve performance of recursive pointer iterations#8741
perf: Improve performance of recursive pointer iterations#8741mtrezza merged 2 commits intoparse-community:alphafrom
Conversation
Code change for performances. Instead of creating and updating the answer array on each iterations, use map function. Signed-off-by: Yechezkel Deren <chderen@gmail.com>
Thanks for opening this pull request!
|
|
Do you have any proof that this is actually better performing and not worse? |
|
I tested on my computer. for arrays grater then 1000 there is a big diff |
Signed-off-by: Yechezkel Deren <chderen@gmail.com>
|
Could you share the metrics and tool you used for performance measurement? There may be factors in the test set-up that would need to be considered (caching, etc) to know how reliable the test results are. |
|
I have isolated the relevant code, and created a test here https://jsbench.me/talmgdggir/1 |
RestQuery.js
RestQuery.js
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## alpha #8741 +/- ##
==========================================
- Coverage 94.32% 87.46% -6.86%
==========================================
Files 186 186
Lines 14773 14770 -3
==========================================
- Hits 13935 12919 -1016
- Misses 838 1851 +1013
☔ View full report in Codecov by Sentry. |
# [6.3.0-alpha.9](6.3.0-alpha.8...6.3.0-alpha.9) (2023-09-13) ### Performance Improvements * Improve performance of recursive pointer iterations ([#8741](#8741)) ([45a3ed0](45a3ed0))
|
🎉 This change has been released in version 6.3.0-alpha.9 |
# [6.4.0-beta.1](6.3.0...6.4.0-beta.1) (2023-09-16) ### Bug Fixes * Parse Server option `fileUpload.fileExtensions` does not work with an array of extensions ([#8688](#8688)) ([6a4a00c](6a4a00c)) * Redis 4 does not reconnect after unhandled error ([#8706](#8706)) ([2b3d4e5](2b3d4e5)) * Remove config logging when launching Parse Server via CLI ([#8710](#8710)) ([ae68f0c](ae68f0c)) * Server does not start via CLI when `auth` option is set ([#8666](#8666)) ([4e2000b](4e2000b)) ### Features * Add conditional email verification via dynamic Parse Server options `verifyUserEmails`, `sendUserEmailVerification` that now accept functions ([#8425](#8425)) ([44acd6d](44acd6d)) * Add property `Parse.Server.version` to determine current version of Parse Server in Cloud Code ([#8670](#8670)) ([a9d376b](a9d376b)) * Add TOTP authentication adapter ([#8457](#8457)) ([cc079a4](cc079a4)) ### Performance Improvements * Improve performance of recursive pointer iterations ([#8741](#8741)) ([45a3ed0](45a3ed0))
|
🎉 This change has been released in version 6.4.0-beta.1 |
* commit 'b1e1bf6708f5d32b2846e66de40f48fb0ec1dc86': chore(release): 6.4.0-beta.1 [skip ci] release chore(release): 6.3.0 [skip ci] release chore(release): 6.3.0-alpha.9 [skip ci] perf: Improve performance of recursive pointer iterations (parse-community#8741) refactor: Parse Pointer allows to access internal Parse Server classes and circumvent `beforeFind` query trigger (parse-community#8734) chore(release): 6.2.2 [skip ci] fix: Parse Pointer allows to access internal Parse Server classes and circumvent `beforeFind` query trigger; fixes security vulnerability [GHSA-fcv6-fg5r-jm9q](GHSA-fcv6-fg5r-jm9q) refactor: Remote code execution via MongoDB BSON parser through prototype pollution; fixes security vulnerability [GHSA-462x-c3jw-7vr6](GHSA-462x-c3jw-7vr6) (parse-community#8677) chore(release): 6.2.1 [skip ci] fix: Remote code execution via MongoDB BSON parser through prototype pollution; fixes security vulnerability [GHSA-462x-c3jw-7vr6](GHSA-462x-c3jw-7vr6) (parse-community#8674) refactor: Add option to convert `Parse.Object` to instance in Cloud Function payload (parse-community#8656)
# [6.4.0-alpha.1](6.3.0...6.4.0-alpha.1) (2023-09-20) ### Bug Fixes * Parse Server option `fileUpload.fileExtensions` does not work with an array of extensions ([#8688](#8688)) ([6a4a00c](6a4a00c)) * Redis 4 does not reconnect after unhandled error ([#8706](#8706)) ([2b3d4e5](2b3d4e5)) * Remove config logging when launching Parse Server via CLI ([#8710](#8710)) ([ae68f0c](ae68f0c)) * Server does not start via CLI when `auth` option is set ([#8666](#8666)) ([4e2000b](4e2000b)) ### Features * Add conditional email verification via dynamic Parse Server options `verifyUserEmails`, `sendUserEmailVerification` that now accept functions ([#8425](#8425)) ([44acd6d](44acd6d)) * Add context to Cloud Code Triggers `beforeLogin` and `afterLogin` ([#8724](#8724)) ([a9c34ef](a9c34ef)) * Add property `Parse.Server.version` to determine current version of Parse Server in Cloud Code ([#8670](#8670)) ([a9d376b](a9d376b)) * Add TOTP authentication adapter ([#8457](#8457)) ([cc079a4](cc079a4)) ### Performance Improvements * Improve performance of recursive pointer iterations ([#8741](#8741)) ([45a3ed0](45a3ed0))
|
🎉 This change has been released in version 6.4.0-alpha.1 |
# [6.4.0](6.3.1...6.4.0) (2023-11-16) ### Bug Fixes * Parse Server option `fileUpload.fileExtensions` does not work with an array of extensions ([#8688](#8688)) ([6a4a00c](6a4a00c)) * Redis 4 does not reconnect after unhandled error ([#8706](#8706)) ([2b3d4e5](2b3d4e5)) * Remove config logging when launching Parse Server via CLI ([#8710](#8710)) ([ae68f0c](ae68f0c)) * Server does not start via CLI when `auth` option is set ([#8666](#8666)) ([4e2000b](4e2000b)) ### Features * Add conditional email verification via dynamic Parse Server options `verifyUserEmails`, `sendUserEmailVerification` that now accept functions ([#8425](#8425)) ([44acd6d](44acd6d)) * Add property `Parse.Server.version` to determine current version of Parse Server in Cloud Code ([#8670](#8670)) ([a9d376b](a9d376b)) * Add TOTP authentication adapter ([#8457](#8457)) ([cc079a4](cc079a4)) ### Performance Improvements * Improve performance of recursive pointer iterations ([#8741](#8741)) ([45a3ed0](45a3ed0))
|
🎉 This change has been released in version 6.4.0 |
Pull Request
Code change for performances.
Instead of creating and updating the answer array on each iterations, use map function.