Skip to content

perf/frontend#2359

Open
max-nextcloud wants to merge 10 commits intomainfrom
perf/frontend
Open

perf/frontend#2359
max-nextcloud wants to merge 10 commits intomainfrom
perf/frontend

Conversation

@max-nextcloud
Copy link
Collaborator

  • chore: refactor usage of fileId query param
  • perf(pagesStore): make currentPage+currentPageId cachable getters
  • perf(pagesStore): remove more usages of pageById()
  • chore(pagesStore): rename collective index and pages getters
  • chore(pagesStore): rename pageParents getters
  • chore(pagesStore): rename getPages functions
  • perf(pagesStore): refactor sorted subpages getters to be cacheable
  • perf(pagesStore): replace allPagesSorted with a cacheable implementation
  • perf(pagesStore): replace visibleSubpages with currentSortedSubpagesByPagentId
  • perf(pagesStore): use hasSubpages where appropriate

mejo- added 5 commits March 21, 2026 09:10
The notFound watcher should be redundant nowadays. We already use the
`fileId` query param to determine `currentPageId`, so the situation that
`currentPage` is undefined but query param `fileId` is defined should
not exist.

Signed-off-by: Jonas <jonas@freesources.org>
Move the business logic to `currentPageId()`. No need to get full page
just for returning the id.

Don't use  `state.pageById()`, which is a function and therefore cannot
be cached. Using `state.pages.find()` instead should help with performance.

Signed-off-by: Jonas <jonas@freesources.org>
More places to use cacheable computed properties that don't depend on
non-cachable function `pageById()`.

Signed-off-by: Jonas <jonas@freesources.org>
We sometimes use `current<getter>` for the current collectie and
`<getter>` for a collective-agnostic getter and sometimes `<getter>` for
the current collective vs. `<getter>ForCollective` for a collective-
agnostic getter.

Let's try to harmonize this and always use `current<getter>` vs.
`<getter>`.

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
mejo- added 5 commits March 21, 2026 10:55
Signed-off-by: Jonas <jonas@freesources.org>
`sortedSubpagesByParentId()` gets calculated once and stays cached until
either `state.pages` or `state.sortOrder` changes.

Signed-off-by: Jonas <jonas@freesources.org>
…yPagentId

Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
@max-nextcloud
Copy link
Collaborator Author

Some things seem to be broken:

  • Cannot create pages anymore.
  • Cannot sort pages by drag & drop anymore - only move them into other pages

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.

2 participants