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

Question about concurrent usage #14

Closed
sachin-walia opened this issue Oct 17, 2017 · 3 comments
Closed

Question about concurrent usage #14

sachin-walia opened this issue Oct 17, 2017 · 3 comments

Comments

@sachin-walia
Copy link

Thanks for the amazing VIPS binding. This is something I've been looking for. I am trying to build this as a microservice and have a questions in terms of the lifecycle of VIPS. I see that in some of the example following statements are present:
vips.Startup(nil)
vips.Shutdown()

My question is that this must be done per http request or once during the server startup/shutdown?

Moreover I am wondering if you have some benchmark comparing this with "sharp" (https://github.com/lovell/sharp) or "bimg" (https://github.com/h2non/bimg). I understand it may not be a 1:1 comparison but it'd be nice to see some numbers.

thanks.

@davidbyttow
Copy link
Owner

Hi, Yes, I've used this quite extensively. It is faster than sharp but I have not tested against bimg. I will get to this at some point.

And no, you do not do startup/shutdown per request, it's done per server startup/shutdown. You shouldn't have to worry about anything else if you use the API directly (it will handle thread cache clearing, etc)

@sachin-walia
Copy link
Author

thanks. Will likely explore your library in upcoming weeks.

@KevinColemanInc
Copy link

I compared compressing 3 jpeg images (a 20Mb, a 100x100, and 1 mid-size jpegs) with govips and h2non/bimg. bimg was faster (by 50-10%) and had slightly more compression.

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

No branches or pull requests

3 participants