-
Notifications
You must be signed in to change notification settings - Fork 3
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
[discussion] Reduce startup time #90
Comments
@jason-curtis I'm open to offering DB setup as a separate process, allowing a migration step to be run separately. |
Love this! Maybe
That would be great! Like maybe only generate the roles that are actually used, rather than all of the generic CRUD roles?
Hmm, off the cuff, 100ms would be an easy yes. I'm assuming here that the vast majority of the startup time is mostly due to interaction with the DB, and that the |
@jason-curtis With the latest v3.5.0 release, subsequent startup time is ~100ms for our big schema (309 abilities), and I think there is still some more performance that can be squeezed out of the system. |
This is an area where we can get some more speedup I think |
I would really love to have support for creating policies in a migration step instead. One of the things I like about Prisma is that it generates a client statically that can be pulled in based on the schema. Doing live DB modifications at startup seems to bypass that logic completely and could make migrations more difficult. It would be great to have an option so that yates can just perform checks based on the schema but not actually perform any updates. Then be able to have a separate migrate step that can be run. |
@hongkongkiwi this is not something that we currently need for our use-case, so we won't be able to dedicate time to it. However, if you can open a PR for this, we'd love to review it and merge it in. Thank you! |
@sebmellen excited to see that this is completed! I'm not seeing anything obvious in the docs though - is this a separate mode or does startup just happen more efficiently out of the box? |
Spinning this discussion off from prisma/prisma#12735 (comment) .
Yates provides a straightforward way to add RLS to Prisma-Postgres setups, but there is overhead at startup:
In serverless configurations, 2.5s on startup of each compute instance can be substantial. Are there ways that we can reduce the startup time? Maybe by moving the DB role validation to a script that can be run asyncronously as part of a build/deploy process?
The text was updated successfully, but these errors were encountered: