Open marek-cottingham opened 3 years ago
Timing tests for IPC indicate that we should not use SVG images in the end application, rather use PNG images. If the C# side (or other) application needs to resize an image window, such as when a user drags to resize, we should simply keep the processed data cached (memory), so that the client process can request a new image with a different resolution / aspect ratio and this can be rendered and set python side.
Timings of test with PNG: 07/12/2008 D 12 pol Took 4.180902100000001 s to process Took 0.465812200000002 s to plot <_io.BytesIO object at 0x000002D16EBAE4F0> Took 0.21888119999999844 s to save to bytes io Took 0.00026239999999688735 s to send over IPC
Timings of test with SVG: 07/12/2008 D 12 pol Took 3.0662438000000005 s to process Took 0.17552479999999981 s to plot <_io.BytesIO object at 0x000001A795D92680> Took 5.017978199999999 s to save to bytes io Took 0.0018436000000008335 s to send over IPC
Took 7.3162325 s to save SVG to disk Took 0.11716079999999884 s to save PNG to disk
We don't have to use Cpython to allow for communication between the front end (C#) and back end (Python) of the application.
Take a look at this option https://zeromq.org/get-started/