perf: Schedule deletion in chunks + Don't create Node objects in a loop - #159
Merged
Conversation
marcelklehr
force-pushed
the
fix/performance
branch
3 times, most recently
from
August 1, 2025 10:58
0294458 to
912ec62
Compare
see #158 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
marcelklehr
force-pushed
the
fix/performance
branch
3 times, most recently
from
August 1, 2025 11:14
ea980ff to
dae1958
Compare
marcelklehr
commented
Aug 1, 2025
| } | ||
|
|
||
| foreach ($files as $file) { | ||
| if (!$this->allowedMimeType($file)) { |
Member
Author
There was a problem hiding this comment.
getAllFilesInFolder checks mimetypes already
marcelklehr
commented
Aug 1, 2025
marcelklehr
commented
Aug 1, 2025
| foreach ($files as $fileId) { | ||
| try { | ||
| $fileRef = ProviderConfigService::getSourceId($file->getId()); | ||
| $this->actionService->deleteSources($fileRef); |
Member
Author
There was a problem hiding this comment.
No more O(n) DB queries
Do not return full Node instances of each file Signed-off-by: Marcel Klehr <mklehr@gmx.net>
marcelklehr
force-pushed
the
fix/performance
branch
from
August 1, 2025 11:42
dae1958 to
60638d2
Compare
kyteinsky
reviewed
Aug 1, 2025
kyteinsky
left a comment
Contributor
There was a problem hiding this comment.
nice!
The method getAllFilesInFolder could be called getAllFilesIdsInFolder now.
for good measure Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
marcelklehr
commented
Aug 1, 2025
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
marcelklehr
force-pushed
the
fix/performance
branch
from
August 1, 2025 12:11
87843a0 to
124402f
Compare
Member
Author
|
mmmh ContextChat statistics: ❌ Indexed files (1354) are OUTSIDE the 15% range of eligible files (691). |
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Merged
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
see #158