Skip to content

Conversation

@engylemure
Copy link

Context

When using the editor on some databases, we may experience page freezes caused by the lint and query execution processes. This issue is currently happening because our lint and exec functions are being executed on the context of our page "main-thread", this thread is responsible for the rendering and handling of user input.

Proposed Changes

To remove the impact of the lint and exec into the main-thread we can move it to a background thread that will be responsible for handling these processes in the background. We can achieve this by making use of Web Workers.

As a way to prevent the unnecessary execution of previously resolved results, we can cache the generated results and use them instead.

We are currently missing the proper saving of the time spent on both the execution of some operations and also the time spent to generate a specific result. To improve this, we can add the timing for both of these parts and present them accordingly at our execution tree.

@rlaiola
Copy link
Contributor

rlaiola commented Oct 22, 2025

@engylemure this PR has the potential to be a very nice add-on. That said, we have to bear in mind that it changes quite a lot for a very specific use case seen in our database systems course at Ufes: freezing/crashing the web browser when dealing with relations of thousands of lines (which is not the case for most of the databases in this repo).

My recommendation is to help the repository maintainers, and the community around this project (me included!), understand how the contributions solve or mitigate the problem. I've been following your code but, please, add unit tests to show off the benefits.

As a hardcore RelaX user, right now my main concern is to guarantee that the tool will be sturdy for the next edition of my course.

Thanks and hope it helps!

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants