I'm working on an effect extension to take a selected input path and return a transformed version of it. The specific use case I have in mind, in which I react to the result of the previous extension output, makes it necessary to execute the script many many times. Originally I had written the extension for Adobe Illustrator, where I got it to work basically without delay. But now I'd really like to use it also in Inkscape. I managed to convert the extension and it does what it is supposed to do, but fairly slowly: One issue is that (on my computer) it takes about 1.5 seconds every time to import the necessary modules and about another 1.5 seconds to return and integrate the output of the extension. This latter number goes up once the document gets filled with a larger number of paths so that often I have to wait 6 seconds or more (while Inkscape itself is still running smoothly). As I said, my plan would be to run the extension way to often to not be annoyed by waiting every time. So my question is: Are there possibilities in the current version of Inkscape to run extensions faster? E.g. could I somehow "cache" the imported modules, or, more importantly, can I get Inkscape to evaluate only the part of the XML tree that my extension actually changes rather than (as I believe it does) the whole XML?
Hello,
I'm working on an effect extension to take a selected input path and return a transformed version of it. The specific use case I have in mind, in which I react to the result of the previous extension output, makes it necessary to execute the script many many times. Originally I had written the extension for Adobe Illustrator, where I got it to work basically without delay. But now I'd really like to use it also in Inkscape. I managed to convert the extension and it does what it is supposed to do, but fairly slowly: One issue is that (on my computer) it takes about 1.5 seconds every time to import the necessary modules and about another 1.5 seconds to return and integrate the output of the extension. This latter number goes up once the document gets filled with a larger number of paths so that often I have to wait 6 seconds or more (while Inkscape itself is still running smoothly). As I said, my plan would be to run the extension way to often to not be annoyed by waiting every time. So my question is: Are there possibilities in the current version of Inkscape to run extensions faster? E.g. could I somehow "cache" the imported modules, or, more importantly, can I get Inkscape to evaluate only the part of the XML tree that my extension actually changes rather than (as I believe it does) the whole XML?
Thanks!
Inkscape 1.4.2 (f4327f4, 2025-05-13)
OS: Win 11
I would ask the developers here https://chat.inkscape.org/channel/inkscape_extensions
Thanks, I'll try that!