imazen / imageflow

High-performance image manipulation for web servers. Includes imageflow_server, imageflow_tool, and libimageflow
https://docs.imageflow.io/
GNU Affero General Public License v3.0
4.14k stars 140 forks source link

Are contexts reusable? #596

Closed untoreh closed 2 years ago

untoreh commented 2 years ago

Is it possible to reuse the same context, or should I destroy and create a new context for each request? There doesn't seem to be a function to reset a context or removing/overwriting input/output buffers

lilith commented 2 years ago

Don't reuse them unless you need to reuse the buffers or images contained in them. They're super cheap

On Sat, Apr 30, 2022, 7:11 AM Francesco Giannelli @.***> wrote:

Is it possible to reuse the same context, or should I destroy and create a new context for each request? There doesn't seem to be a function to reset a context or removing/overwriting input/output buffers

— Reply to this email directly, view it on GitHub https://github.com/imazen/imageflow/issues/596, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2LHY7QKMCKDDIBJQN6STVHUWQTANCNFSM5UYK5XKQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>