1

Recently I am adding support for changing background image in my extension. The extension UI has a left navigation panel, a toolbar and a data list(table). Since I want a transparent background image for the whole page, I learned that the only way to do so is to create two divs in same level, one for background and the other for wrapping all my UI contents (the method here https://stackoverflow.com/a/3241421/2758907)

The problem is that, with this method, my extension uses 170~180mb memory(as seen in Chrome's Task Manager). But without background(the only difference), the extension only uses about 37mb memory. Do you have any idea of what's going wrong?

The image below shows the full UI. Adding that background image to the whole page increases memory usage tremendously. The image is of jpg format, size: 1280x850 enter image description here

Community
  • 1
  • 1
Jun
  • 347
  • 3
  • 12
  • Have you tried different background image? I can recommend this page https://tinypng.com/ for png compression. – Piotr Łużecki Mar 07 '15 at 10:44
  • put the image here or a similar image. If I see it I could better advise you. I would say rebuild the image using sprites. that takes alot less memory. see: https://css-tricks.com/css-sprites/ – Maze Runner Mar 07 '15 at 14:24
  • I am using jpg image, the image itself is only 122KB. Even if it's decoded to a bitmap, it should not consume that much memory. – Jun Mar 07 '15 at 16:02
  • It's not really making the text readable though. Are you sure it's a good idea to begin with? – Xan Mar 07 '15 at 17:50
  • I've implemented changing image and opacity. User can adjust to get best view. – Jun Mar 08 '15 at 06:29

0 Answers0