Opened 19 years ago
Closed 19 years ago
Last modified 19 years ago
#3506 closed enhancement (fixed)
Reduce memory usage by not duplicating button images in memory
| Reported by: | stuartm | Owned by: | stuartm |
|---|---|---|---|
| Priority: | major | Milestone: | 0.21 |
| Component: | mythtv | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
The attached 'proof of concept' patch significantly reduces memory usage of mythfrontend with some themes by not loading the same watermarks and icons into memory multiple times. Right now if two menu entries share the same watermark or icon, then that image is loaded each time. The patch instead maintains a list of loaded images and pointers allowing a single image in memory to be shared.
Another benefit should be that startup is marginally faster because we no longer go back to the disk each time.
Example memory savings with blootube-wide (mileage my vary)
Normal - Without Patch ---------------------- VIRT RES SHR S %CPU %MEM TIME+ COMMAND 593m 302m 33m S 0.0 30.1 0:52.66 mythfrontend With Patch ---------- VIRT RES SHR S %CPU %MEM TIME+ COMMAND 435m 143m 33m S 0.0 14.3 0:04.54 mythfrontend
Attachments (2)
Change History (8)
comment:1 by , 19 years ago
| Owner: | changed from to |
|---|
comment:2 by , 19 years ago
by , 19 years ago
| Attachment: | reuse_button_images.2.diff added |
|---|
Added the same prevention of duplicates for title icons
comment:3 by , 19 years ago
Second version of patch, this time adding title icons to the images which we avoid loading more than once.
Blootube-wide @ 1280x800
Normal - Without Patch ---------------------- VIRT RES SHR S %CPU %MEM TIME+ COMMAND 593m 302m 33m S 0.0 30.1 0:52.66 mythfrontend With second patch ----------------- VIRT RES SHR S %CPU %MEM TIME+ COMMAND 425m 133m 31m S 0.0 13.3 0:04.69 mythfrontend
comment:4 by , 19 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Reduces mythfrontend memory consumption with certain themes by not loading the same image into memory more than once.
Actual savings vary according to theme and resolution - From 0% with Illius to 75% with MythCenter.
comment:6 by , 19 years ago
(In [13554]) Backport [13513] and [13515] to -fixes.
Refs #3506. Reduces mythfrontend memory consumption with certain themes by not loading the same image into memory more than once.
Actual savings vary according to theme and resolution - From almost nothing with Illius upto 75% with MythCenter.

resident mem usage went down by about 5mb after patching and vm size went down by about 4mb patch does appear to be saving some memory:)