Skip to content

Conversation

@psrok1
Copy link
Member

@psrok1 psrok1 commented Dec 18, 2025

Your checklist for this pull request

  • I've read the contributing guideline.
  • I've tested my changes by building and running the project, and testing changed functionality (if applicable)
  • I've added automated tests for my change (if applicable, optional)
  • I've updated documentation to reflect my change (if applicable)

What is the current behaviour?

Motivation is similar to #1023. When we are querying or uploading a very popular object with incrementally growing number of relationships and Karton analyses, all of these analyses are loaded by backend and returned which causes excessive use of resources and request timeouts.

In case of Karton analyses, Karton backend is additionally asked for status of each analysis which causes additional overhead. The result is usually worker killed with WORKER TIMEOUT.

What is the new behaviour?

  • API returns only 10 Karton analyses at once. More analyses can be loaded using new older_than parameter.
  • Backend avoids loading Object.analyses and Object.parents also during creation/removal of the relationships. Right now we observe that WORKER TIMEOUT happens also when such "popular" object is uploaded.
  • Karton analyses returned by API were unordered. Now they're ordered from latest to oldest.
  • I have also fixed some issues related with analysis id typing in the frontend part.
image

Test plan

API correctness should be already covered by automated tests. "Popular" object querying and upload was tested manually.

Closing issues

closes #1050

@psrok1 psrok1 force-pushed the feature/karton-pagination branch from 28ab1b9 to 9a9c283 Compare December 18, 2025 14:35
@psrok1 psrok1 changed the title Fix: Karton analyses list pagination and optimized handling of object relationships Limit Karton analyses list to 10 elements, add pagination and optimize handling of object relationships Dec 18, 2025
@psrok1 psrok1 marked this pull request as ready for review December 18, 2025 15:07
@psrok1 psrok1 force-pushed the feature/karton-pagination branch from e37ce22 to 2b24382 Compare December 18, 2025 15:09
@psrok1 psrok1 force-pushed the feature/karton-pagination branch from 2b24382 to 91f45ae Compare December 18, 2025 16:28
@psrok1 psrok1 merged commit 9e6d711 into master Dec 18, 2025
12 checks passed
@psrok1 psrok1 deleted the feature/karton-pagination branch December 18, 2025 16:39
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.

Limit number of Karton analyses on screen in object view

2 participants