invoice2data icon indicating copy to clipboard operation
invoice2data copied to clipboard

performance with templates

Open Nexulo opened this issue 6 years ago • 1 comments

Hello together and thank you for this great repository!

I‘ve a question about the performance with the yml-templates. Does someone know how fast the script works with hundreds and thousands of template files? Will be the execute time very long or what should i expect?

best regards maisen

Nexulo avatar Jan 27 '19 22:01 Nexulo

Currently templates are single files and they are all read on init. For a large-scale use case there should be optimizations to this. E.g. caching them in binary format or having a preliminary step to choose the required template first.

m3nu avatar Jan 28 '19 00:01 m3nu

Does someone know how fast the script works with hundreds and thousands of template files? Will be the execute time very long or what should i expect?

Yes, the execution time will be high! It is even so when using the packaged templates. That's because the pyaml, which is responsible for opening the template files is very slow.

in https://github.com/invoice-x/invoice2data/pull/471 there is a proposal to support a faster yaml library written in c. And to support much faster json template files.

bosd avatar Feb 12 '23 23:02 bosd