nextcloud / forms

📝 Simple form & survey app for Nextcloud
https://apps.nextcloud.com/apps/forms
GNU Affero General Public License v3.0
316 stars 97 forks source link

Optimization method FormsService::canSubmit #2225

Closed AIlkiv closed 2 months ago

AIlkiv commented 3 months ago

Currently, to check if a user has filled out the form, all entities are retrieved, and then two loops are performed at the PHP. My version does the same thing but with a single simple query.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 52.63158% with 9 lines in your changes missing coverage. Please review.

Project coverage is 46.03%. Comparing base (f6c1b8a) to head (a0b26df).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2225 +/- ## ============================================ + Coverage 45.95% 46.03% +0.08% - Complexity 797 800 +3 ============================================ Files 65 66 +1 Lines 3066 3065 -1 ============================================ + Hits 1409 1411 +2 + Misses 1657 1654 -3 ```
Chartman123 commented 2 months ago

@AIlkiv could you please rebase on current main?