Skip to content

Lowering level for multi-threading #1305

@loromagnoni

Description

@loromagnoni

Hi! My Electron application opens a SQLite connection through BetterSQLite3 from a Electron Renderer process with Node integration enabled.

To test concurrency I did the following experiments:

  • Send a query request from Electron Renderer to Electron Main, propagated then to a Node worker thread which executes the query.
  • Send a query requests from Electron Renderer to a web worker which executes the query.

In both scenarios the communication overhead was extremely noticeable.
All my queries are handled by SQLite in less than 25ms, with these two approaches the total roundtrip duration goes from 2x to 10x.

I am wondering if handling multi-threading at the driver level could avoid the communication overhead experienced when handling it at the application level. Do you have any idea on this? Is it even possible in Electron to manage thread at a native level?

Thank you for your time

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions