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

Start backend in seperate worker thread #120

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

bartolomej
Copy link
Member

@bartolomej bartolomej commented Sep 20, 2022

Notion task.

This indeed seems to solve the slight "glitching" effects noticed in the app. I haven't yet tried testing it on production builds, but in development everything worked fine.

Node worker threads documentation: https://nodejs.org/api/worker_threads.html

@bartolomej bartolomej marked this pull request as ready for review September 20, 2022 14:40
@bartolomej bartolomej merged commit 7d9b9c3 into development Sep 20, 2022
@bartolomej bartolomej deleted the prevent_blocking_main_thread branch September 20, 2022 16:02
Copy link
Collaborator

@MrakJakob MrakJakob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@bartolomej
Copy link
Member Author

Just mentioning here. There was actually an issue with production build, where it couldn't found the electron module in the worker thread. I fixed that in this commit 1d758a4.

@bartolomej
Copy link
Member Author

This change causes Flowser to crash unpredictably, due sqlite3 bindings not working well in multi-threaded envirnoment: TryGhost/node-sqlite3#1365

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.

2 participants