-
Notifications
You must be signed in to change notification settings - Fork 6
perf: Schedule deletion in chunks + Don't create Node objects in a loop #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0294458 to
912ec62
Compare
see #158 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
ea980ff to
dae1958
Compare
| } | ||
|
|
||
| foreach ($files as $file) { | ||
| if (!$this->allowedMimeType($file)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAllFilesInFolder checks mimetypes already
| foreach ($files as $fileId) { | ||
| try { | ||
| $fileRef = ProviderConfigService::getSourceId($file->getId()); | ||
| $this->actionService->deleteSources($fileRef); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more O(n) DB queries
Do not return full Node instances of each file Signed-off-by: Marcel Klehr <mklehr@gmx.net>
dae1958 to
60638d2
Compare
kyteinsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
87843a0 to
124402f
Compare
kyteinsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
|
mmmh ContextChat statistics: ❌ Indexed files (1354) are OUTSIDE the 15% range of eligible files (691). |
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
see #158