Taking long to open print dialog

i am trying to print a container but the dialog takes long to open. below is my code under action performed event of a button

ticket = event.source.parent.getComponent("Container")
job = system.print.createPrintJob(ticket)
job.print()
window = system.nav.openWindow('Home')
system.nav.closeParentWindow(event)

Facing similar issue.
Any update on this?

Is it every time, or just the fisrt time the dialog loads?