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

Very slow script startup #11

Closed
maBarabas opened this issue Jan 31, 2022 · 5 comments
Closed

Very slow script startup #11

maBarabas opened this issue Jan 31, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@maBarabas
Copy link

I've installed this script from the npm registry.

When I run it from the command line, the startup takes a few seconds. This is the same every time it is started.

I'm trying to convert about a dozen images, so this really slows down the build. Is there any way to speed it up? The old PHP script was quite fast, but is more difficult to run on windows, so I'm looking into this nodejs version.

$ time lv_img_conv --version
0.1.3

real    0m2.837s
user    0m4.670s
sys     0m0.210s
@embeddedt embeddedt added the enhancement New feature or request label Jan 31, 2022
@embeddedt
Copy link
Member

FYI, it's possible to pass multiple images at once (although this isn't documented). The output file will have the same name and path but with the image extension replaced by .c.

@maBarabas
Copy link
Author

I'm using the -o option to place the generated files in CMAKE_CURRENT_BINARY_DIR. It doesn't look like this supports multiple input files, is this correct?

@embeddedt
Copy link
Member

In 0.2.1 you can change the working directory to affect the output path (as you suggested).

@maBarabas
Copy link
Author

Thanks, I've decided to stay with PHP for now, php.exe works the same as php on Linux. The php docs made it more confusing than it really is.

@embeddedt
Copy link
Member

FYI, startup should be a lot faster now. I've done some refactoring in the latest version and upgraded ts-node which sped things up a lot.

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

2 participants