Skip to content

Conversation

@marcelklehr
Copy link
Member

see #158

@marcelklehr marcelklehr requested a review from kyteinsky August 1, 2025 10:55
@marcelklehr marcelklehr force-pushed the fix/performance branch 3 times, most recently from 0294458 to 912ec62 Compare August 1, 2025 10:58
see #158

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr force-pushed the fix/performance branch 3 times, most recently from ea980ff to dae1958 Compare August 1, 2025 11:14
@marcelklehr marcelklehr changed the title fix(FsEventService#onDelete): Schedule deletion in chunks perf: Schedule deletion in chunks + Don't create Node objects in a loop Aug 1, 2025
}

foreach ($files as $file) {
if (!$this->allowedMimeType($file)) {
Copy link
Member Author

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);
Copy link
Member Author

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>
Copy link
Contributor

@kyteinsky kyteinsky left a 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>
Copy link
Contributor

@kyteinsky kyteinsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@marcelklehr
Copy link
Member Author

mmmh

ContextChat statistics:
Installed time: 2025-08-01 12:20 UTC
Index complete time: 2025-08-01 13:08 UTC
Total time taken for complete index: 0 days 00:48 (hh:mm)
Total eligible files: 691
Files in indexing queue: 0
Queued documents (without files):array (
)
Files successfully sent to backend: 1354
Indexed documents: array (
'files__default' => 1354,
)
Actions in queue: 0
File system events in queue: 0

❌ Indexed files (1354) are OUTSIDE the 15% range of eligible files (691).

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr merged commit 7f726d7 into main Aug 4, 2025
34 checks passed
@marcelklehr marcelklehr deleted the fix/performance branch August 4, 2025 06:30
@kyteinsky kyteinsky mentioned this pull request Aug 29, 2025
@kyteinsky kyteinsky mentioned this pull request Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants