zorantica / plsql-qr-code

Oracle PL/SQL Package and APEX plugin for QR Code Generation
MIT License
52 stars 20 forks source link

Possible optimizations: execution time, SVG file size #10

Open kukimik opened 3 weeks ago

kukimik commented 3 weeks ago

Hello Zoran! Thank you for your work on ZT_QR!

We are using a modified version of your package; to meet our needs we needed to make it faster and reduce the size of the generated SVG files.

  1. We managed to vastly reduce the size of the generated SVGs by using paths instead of rects (this comes at the cost loss of control over individual rectangles if one wants to post-process the file), and using some other SVG features. The resulting files are about 10-15% of the original size (for blocks without rounded edges).
  2. When generating a large number of QR-codes in a single session, the execution time may be reduced by upfronting the initialization of the reference tables (moving it to the package initialization section) and getting rid of dbms_output (we put it behind a conditional compilation flag). We also tried some VARCHAR2-buffering in f_qr_as_svg.p_add_clob, but it didn't have much effect.

Would you be interested in merging PRs that provide these optimizations? As preparing a PR takes some effort, I wanted to know whether there is a chance of getting this merged before investing our time.

zorantica commented 2 weeks ago

Hello Michał! Every optimization and functionality upgrade is highly welcomed and appreciated! If You have time and resources please prepare a version for merging. And if You need any assistance please let me know.