Yes, it probably has to do with the postgres slowness.
I downgraded jsreport 3.2 back to jsreport 2.11 on the same kubernetes pod (same machine, same resources, same postgres server) to compare.
Below are the results.
But even if the postgres is slow to respond, I wonder why does the asset replacing take 3 times longer now in jsreport 3.2 compared to jsreport 2.11 with the same setup.
For now, I have to keep using jsreport 2.11.
+0 Starting rendering request 15 (user: root) +71 Rendering template { name: tickets-default, recipe: chrome-pdf, engine: handlebars, preview: true } +210 Adding sample data BMnrDZR +211 Resources not defined for this template. +246 Base url not specified, skipping its injection. +592 Replaced assets ["../../watermark.css","./../images/train_icon.svg","test-styles.css","./../images/class_icon.svg","./../images/coach_icon.svg","./../images/seat_icon.svg","./../images/wheelchair_icon.svg","./../images/blank_logo.svg","./../images/route_icon.svg","./../images/od_icon.svg","./../images/arrow_icon.svg","./../images/test_link_logo.svg","./../images/date_icon.svg","./../images/person_icon.svg","./../images/time_icon.svg"] +1006 Replaced assets ["/test/fonts/regular.ttf","/test/fonts/semibold.ttf"] +1146 Replaced assets ["test-helper-functions.js"] +1147 Rendering engine handlebars using http-server strategy +1175 Taking compiled template from engine cache +1226 Executing recipe chrome-pdf +1241 Converting with chrome HeadlessChrome/79.0.3945.130 using chrome-pool strategy +1291 Page request: GET (document) file:///tmp/jsreport/autocleanup/18dce46d-5d68-47ca-97af-a4259c7d64fd-chrome-pdf.html +1319 Page request finished: GET (document) file:///tmp/jsreport/autocleanup/18dce46d-5d68-47ca-97af-a4259c7d64fd-chrome-pdf.html +1331 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy... +1333 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy... +1333 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTM5IiBoZWlnaHQ9IjM1IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj... +1333 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTM5IiBoZWlnaHQ9IjM1IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj... +1334 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIzIiBoZWlnaHQ9IjE3MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLz... +1334 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIzIiBoZWlnaHQ9IjE3MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLz... +1334 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjkiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1335 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjkiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1335 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUiIGhlaWdodD0iNzguNzMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy... +1335 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUiIGhlaWdodD0iNzguNzMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy... +1375 Page request: GET (font) data:font/ttf;base64,AAEAAAAPAIAAAwBwRkZUTYSLY84AAiesAAAAHEdERUYJMQupAAEbCAAAADZHUE9TukgglQABMfAAAPW6R1NVQjF/R20AARtAAAAWrk9TLzJr0XaZAAABeAAAAGBjbWFwgtKRBgAADOQAAAR2Z2FzcP//AAMAARsAAAAACGdseWYsBK6xAAAW5AAA5VxoZWFkEfGAogAAAPwAAAA2aGhlYQfTBbwAAAE0AAAAJGhtdHjOWDcbAAAB2AAACwxsb2NhDjFOIAAAEVwAAAWIbWF4cAPIChYAAAFYAAAAIG5hbWWca0aZAAD8QAAACLVwb3N08mvPcwABBPgAABYHAAEAAAADAELnx3lfXw889QALA+gAAAAA1z2Z4QAAAADXqaLk/o3+zgVbA+gAAQAIAAIAAAAAAAAAAQAAA+j+9AAABXf+jf6NBVsAAQAAAAAAAAAAAAAAAAAAAsMAAQAAAsMKEwDDAAAAAAACAAAAAQABAAAAQAAAAAAAAAADAl0CWAAFAAACvAKKAAAAjAK8AooAAAHdAEkBEwAAAgsHBAAAAAAAAKAAAn9QAAA7AAAAIAAAAABTd1R5ACAAIP7/Atz+9AAAA+gBDCAAAJcAAAAAAfQCxgAAACAADAKEAEgAAAAAAU0AAADkAAABIAArAbIAOgLWACACGAAoA9QAHAMCAD8A6AA6ASsAJwEqABYB7AAfAewAJAEaABsBkAA5ARcAJwIiABICdwAzAXAAAgI9ACkCTAAjAn0AEgI8AB8COQAjAh8AIgJMACoCOQAnASsAMQEuACYB3QAaAh0APAHdABsCBwAcAyMAKALnAAECegBPAwwAJgLMAE8COABPAh4ATwMlACYC9ABPAS8ATwIjABQCtgBPAicATwN0AE8DGABPAygAJQJPAE8DSAAlApAATwJRACICOAAVAtAARwLRAAMDwQASArn/+gKyAA... +1387 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUiIGhlaWdodD0iNzIuOTk5OTk5OTk5OTk5OTkiIHhtbG5zPSJodHRwOi... +1388 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUiIGhlaWdodD0iNzIuOTk5OTk5OTk5OTk5OTkiIHhtbG5zPSJodHRwOi... +1388 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUiIGhlaWdodD0iODAuNSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLz... +1388 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUiIGhlaWdodD0iODAuNSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLz... +1389 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUiIGhlaWdodD0iODYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1390 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUiIGhlaWdodD0iODYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1390 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iNzUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1390 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iNzUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1391 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iNzkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1391 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iNzkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1392 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTkiIGhlaWdodD0iNjMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1392 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTkiIGhlaWdodD0iNjMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1392 Page request: GET (image) data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzAiIGhlaWdodD0iODciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1392 Page request finished: GET (image) 200 data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzAiIGhlaWdodD0iODciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMD... +1393 Page request: GET (image) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAABpCAYAAAA5gg06AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjw... +1393 Page request finished: GET (image) 200 data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAABpCAYAAAA5gg06AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjw... +1393 Page request: GET (image) data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAABkCAIAAAAg8ZCBAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjw... +1393 Page request finished: GET (image) 200 data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAABkCAIAAAAg8ZCBAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjw... +1442 Page request finished: GET (font) 200 data:font/ttf;base64,AAEAAAAPAIAAAwBwRkZUTYSLY84AAiesAAAAHEdERUYJMQupAAEbCAAAADZHUE9TukgglQABMfAAAPW6R1NVQjF/R20AARtAAAAWrk9TLzJr0XaZAAABeAAAAGBjbWFwgtKRBgAADOQAAAR2Z2FzcP//AAMAARsAAAAACGdseWYsBK6xAAAW5AAA5VxoZWFkEfGAogAAAPwAAAA2aGhlYQfTBbwAAAE0AAAAJGhtdHjOWDcbAAAB2AAACwxsb2NhDjFOIAAAEVwAAAWIbWF4cAPIChYAAAFYAAAAIG5hbWWca0aZAAD8QAAACLVwb3N08mvPcwABBPgAABYHAAEAAAADAELnx3lfXw889QALA+gAAAAA1z2Z4QAAAADXqaLk/o3+zgVbA+gAAQAIAAIAAAAAAAAAAQAAA+j+9AAABXf+jf6NBVsAAQAAAAAAAAAAAAAAAAAAAsMAAQAAAsMKEwDDAAAAAAACAAAAAQABAAAAQAAAAAAAAAADAl0CWAAFAAACvAKKAAAAjAK8AooAAAHdAEkBEwAAAgsHBAAAAAAAAKAAAn9QAAA7AAAAIAAAAABTd1R5ACAAIP7/Atz+9AAAA+gBDCAAAJcAAAAAAfQCxgAAACAADAKEAEgAAAAAAU0AAADkAAABIAArAbIAOgLWACACGAAoA9QAHAMCAD8A6AA6ASsAJwEqABYB7AAfAewAJAEaABsBkAA5ARcAJwIiABICdwAzAXAAAgI9ACkCTAAjAn0AEgI8AB8COQAjAh8AIgJMACoCOQAnASsAMQEuACYB3QAaAh0APAHdABsCBwAcAyMAKALnAAECegBPAwwAJgLMAE8COABPAh4ATwMlACYC9ABPAS8ATwIjABQCtgBPAicATwN0AE8DGABPAygAJQJPAE8DSAAlApAATwJRACICOAAVAtAARwLRAAMDw... +1447 Running chrome with params {"printBackground":true,"format":"A4","marginTop":"30px","marginBottom":"30px","mediaType":"print","margin":{"top":"30px","bottom":"30px"}} +1628 Rendering request 15 finished in 1628 ms