You can use "editor" plugin and copy complete code from memory if you want it to be used static.
Not sure if this will speed things up dramatically.
Thanks, Umalo,
That was what i needed. Regarding performance, the add_thumbs operation takes about 2 seconds on my computer.
So, it should definately help, but we will see.
Thanks,
Tomas