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

Compile as a 32 and 64 bit dll #159

Open
dummzeuch opened this issue Feb 20, 2025 · 1 comment
Open

Compile as a 32 and 64 bit dll #159

dummzeuch opened this issue Feb 20, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@dummzeuch
Copy link

dummzeuch commented Feb 20, 2025

Calling an executable is rather expensive in Windows. It would be much faster for the IDE plugin to call a DLL instead. And since other tools might also use it a 64 bit and 32 bit DLL would be really nice.

(I would help, but I have no experience with Rust programming.)

@zaneduffield
Copy link
Collaborator

Hi @dummzeuch, thanks for asking this; it's a good question.

When creating pasfmt-rad we did consider all the available options for integration and we settled on subprocess communication for a few reasons

  1. It's the easiest interface to keep stable across multiple versions of the program
  2. It's simpler and less error-prone
  3. The performance was more than good enough in our testing.
    On a fast CPU (with no anti-virus) I have measured the overhead of launching a Windows process to be about 10ms.
    On a reasonably fast CPU (with anti-virus) I have measured this overhead as closer to 30ms.
    While these durations are an eternity for a computer, they are merely one or two additional frames for a user in front of a screen.

I do agree that it would be faster if run as a DLL, but it would have to be a complex interface to support all of the configuration options, and this interface is bound to be unstable because the tool is so new.

If you have some evidence that shows that the expense of running pasfmt as a subprocess is noticeable in the IDE plugin I'd be interested to see it.

@jgardn3r jgardn3r added the enhancement New feature or request label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants