Skip to content
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

[Conflicts] Merge main into next #2633

Open
wants to merge 7 commits into
base: next
Choose a base branch
from

Conversation

vivid-planet-bot
Copy link
Collaborator

This is an automated pull request to merge changes from main into next. It has merge conflicts. To resolve conflicts, check out the branch merge-main-into-next locally, make any necessary changes to conflicting files, and commit and publish your changes.

nsams and others added 2 commits October 16, 2024 08:48
This adds redis to docker-compose and a cache-handler implementation
based on "a big project of vivid-planet".
Certain GraphQL-related errors were hard to debug in applications. We
make two changes to improve this:
1. Add the request body to the error message if the request fails.
GraphQL schema validation errors are treated as 400 errors, so the error
handling for GraphQL errors was never "reached".
2. Add a useful error message when importing a GraphQL document from a
React Client Component.
We sometimes need the affected content scope(s) in a block's transformer
service. To enable this, we set the content scopes retrieved in the
`UserPermissionsGuard` in the `request` object (similar to how the
`AuthGuard` sets the `user` ). This then allows accessing the content
scopes in the transformer service.
Large number of redirects can cause issues in real projects. Help on
improving the situation by making the API a bit faster.(that alone won't
be the solution).

- Add fixtures that create 7000 redirects (for this the additional
exports are needed)
- Add a relatively simple performance optimization in redirects
resolver: Call `this.pageTreeReadApi.preloadNodes(scope);` to load the
whole page tree into memory, as most redirects will access it (when they
are internal)
- Local tests showed (when loading 100 redirects) ~250ms (before) vs
~100ms (after) (!)
- (Demo only) Add an index on `Redirect.scope_domain`
- No difference in Demo performance, but much needed in "real"
multidomain applications
- Unfortunately this won't be generated by MikroORM, as the redirect
entity is in library only
- And increase the maximum limit for paginated redirects query from 100
to 1000
- Not much improvement, but still ~4.8s (before) vs ~3.2s (after) (both
with preloadNodes)

---------

Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
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