Closed Andrewknackstedt closed 1 year ago
This is the schema for reference: https://github.com/knackstedt/dot-ops/tree/main/database/02b-tables
Hey there!
I was able to confirm this issue and have passed it along to the appropriate members of our team. Some of our members are currently out of town and will not be back for several days. Therefore, it might take a few extra days to resolve this issue.
Thanks for your report!
Thanks @ItsMateo! I'm in no rush, so don't worry about it ;). I'm just making sure you're aware of issues that users experience, because you only know if someone tells you or you yourself notice an issue
This is a known SurrealDB issue which also affects query parsing. I would recommend going in settings and disabling "Query error checking" as that will prevent the issue from happening.
Hope that helps!
Please reopen -- I don't think that's the right evaluation of this issue. This is a UI stuttering issue, where Surrealist is stuttering by itself without a pending outgoing transaction. It stutters even if I'm not connected to any instances.
Therefore, that 500kb issue, while very real, is not the only problem here
There's nothing I can do about it. Under the hood Surrealist will pass the query to SurrealDB for parsing and validation. This is supposed to return a result, however in the case of passing deeply nested objects the function will hang indefinitely, blocking the entire application and UI. There's no proper way to know whether a query will cause a crash or not.
Disabling error checker simply prevents Surrealist from passing the query to SurrealDB, circumventing this issue
Why does that make Surrealist freeze when it's not connected to any SurrealDB instance? Shouldn't the UI simply have an async outgoing promise pending the response?
Remote database instances don't expose APIs to perform certain tasks. Surrealist uses an embedded version of SurrealDB internally for multiple features related to schemas and parsing (which is why some features are only available in the desktop version), hence it invokes SurrealDB from Rust which is where the application crashes beyond my control.
Gotcha, Thank you for explaining that to me. It may be possible to wrap that internally executed rust logic in an asynchronous parser that runs on a separate thread. I might look at that if I have the time later we'll see
Cool, you can find the offending code in validate_query
in schema.rs
Describe the bug When working on a large query body, surrealist stutters and freezes, becoming difficult to use.
To Reproduce Steps to reproduce the behavior:
Expected behavior Expected large body of text to be editable and no UI stuttering
Environment (you can view the current version under Settings):
Sample Query: