[solved] Asking for a big file with lots of layers for testing (rewrote Unhide Layers plugin)

Hi,
Does anybody have a really big file with a lot of layers to share?
I rewrote Konstantin’s Unhide Layers plugin, using a more XML-oriented way: https://github.com/3l3gant-cod3s/synfig/blob/3l3gant-cod3s-patch-plugin-unhide-with-xpath/synfig-studio/plugins/view-unhide-all-layers/view-unhide-all-layers.py
Ice0 and mohamedAdhamc suggested to do some performance tests before accepting my #2968 PR but I’m new to Synfig. So I have no really big file at hand and didn’t find any online.
Thanks in advance!
E.C

1 Like

I have discovered the Synfig-examples .deb :-/
its pirates.sif has 1726 layers, quite enough I think.

Don’t worry, as it is a plugin, there is no problem of performances, even with big files.
The only thing is that it needs to load a full tree in memory while the original was “quick-and-dirty”, for sure faster and less heavy.
But it is attacking directly the file as text, which is not a good practice.
Yours is done “the good way”
I would like so bad a real scripting API :stuck_out_tongue:

If you need very big number of layers… Ask @Svarov :crazy_face:

1 Like

Thank you @BobSynfig!
I have “instrumented” both codes (K’s and mine) and mine is ~10× slower (3s versus .26s) for the core operation (changing the states of layers).
But the whole operation takes ~12-15s. :slight_smile:
(it’s probably redrawing that bunch of layers that takes such a long time)
E.C

This plugin is 11 years old and was mostly used as a proof of concept.
It should be implemented “in hard” in C++ code (by walking the internal structure, as XML walking).
The current plugin system is just doing:

  • save the fille
  • start python script on a temp copy
  • reopen the temp file (and reload it)

It requires to know well the internal structure of .sif file.
That’s the reason why I was writing “no problem of performances” because it is not efficient by nature :stuck_out_tongue:

1 Like