qzind / tray

Browser plugin for sending documents and raw commands to a printer or attached device.
https://qz.io
Other
849 stars 276 forks source link

Memory utilization increase 2.1.4 -> 2.1.6 #964

Closed tresf closed 1 year ago

tresf commented 2 years ago

As reported by a premium customer:

[...] we were able to reproduce [... the memory increase ...] with QZ Tray 2.1.6 [...]. Although [... the memory utilization ...] is initially lower than the version with QZ Tray 2.1.4 [...], the memory increases with each document printed at a far greater rate in the new version [QZ Tray 2.1.6] than the old [QZ Tray 2.1.4].

The customer is printing ~160KB PDF using Base64 format. My suspicion is that Log4J2 is a bit less efficient about this.

Potential solution from Apache: https://logging.apache.org/log4j/2.x/manual/garbagefree.html#Impact_on_Application_Code:_Autoboxing

tresf commented 1 year ago

Potential solution from Apache: https://logging.apache.org/log4j/2.x/manual/garbagefree.html#Impact_on_Application_Code:_Autoboxing

This only seems to affect autoboxing of primitives. We do use primitives in a few areas, but not enough for concern. We'll shelf this for the time being.