Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Reduce amount of indexes when using viur-core>=3.6 #14

Open
phorward opened this issue Apr 30, 2024 · 0 comments
Open

Reduce amount of indexes when using viur-core>=3.6 #14

phorward opened this issue Apr 30, 2024 · 0 comments
Labels
bug Something isn't working performance This issue or pull request enhances or criticizes the performance. Priority: High After critical issues are fixed, these should be dealt with before any further issues.

Comments

@phorward
Copy link
Member

phorward commented Apr 30, 2024

Hi!

viur-scriptor currently requires further indexes when used within a project that uses viur-core>=3.6. This is because v3.6 comes with the default_order features.

The additionally required indexes are:

- kind: viur-script-node
  properties:
  - name: plugin
  - name: sortindex

- kind: viur-script-leaf
  properties:
  - name: plugin
  - name: sortindex

This seems wrong, as the only required index before was, and still should be enough:

- kind: viur-script-leaf
  properties:
  - name: parententry
  - name: sortindex

- kind: viur-script-node
  properties:
  - name: parententry
  - name: sortindex

The newly added indexes are required by viur-core>=3.6 projects, but shouldn't!
shot-2024-04-30_20-28-00

Therefore, two proposals:

  1. Simple but ugly: Try to run the current request with the parententry to the root node, this should avoid the requirement for an index on the plugin property
  2. Otherwise, enhanced but better: Just request the script's node tree as already done, and check there for plugin=True setting, which will also reduce the amount of requests in the end. Nodes with plugin=True will be handled differently in this case.

The second proposal is the better option.

@phorward phorward added Priority: High After critical issues are fixed, these should be dealt with before any further issues. bug Something isn't working performance This issue or pull request enhances or criticizes the performance. labels Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working performance This issue or pull request enhances or criticizes the performance. Priority: High After critical issues are fixed, these should be dealt with before any further issues.
Projects
None yet
Development

No branches or pull requests

1 participant