Jump to content

Memory Performance on Mobile


Gerente
 Share

Recommended Posts

Hi, I have an app that is a kind of photo gallery, after loading 10 photos in a mobile the browser crash  (Iphone 6)

It is probably related with Memory, each image its about 300kb.

I have been using .dispose() before assign the texture but it does not have effect.

 

sphere.material.emissiveTexture.dispose();sphere.material.emissiveTexture = texture;

I'm desperate, I really don't know how to fix this.

 
Any advice is welcome.
 
Thanks
Link to comment
Share on other sites

The image size is usually not the problem. It's the image's resolution that can cause those kinds of things. The image's are stored uncompressed in the gpu.
Try reducing the resolution of the images.

 

A simple calculation:

a JPG needs 24 bits per pixel (thou I am pretty sure that textures are all stored using 32 bits). a 1000x1000 image takes 1000x1000x24 bits, meaning - 24,000,000 bits. which are ca. 3 MB. A 2000x2000 image will take 112MB. 10 Images will take 1120MB. Your desktop GPU will be able to handle this. a mobile GPU will have a hard time.

Link to comment
Share on other sites

The image size is usually not the problem. It's the image's resolution that can cause those kinds of things. The image's are stored uncompressed in the gpu.

Try reducing the resolution of the images.

 

A simple calculation:

a JPG needs 24 bits per pixel (thou I am pretty sure that textures are all stored using 32 bits). a 1000x1000 image takes 1000x1000x24 bits, meaning - 24,000,000 bits. which are ca. 3 MB. A 2000x2000 image will take 112MB. 10 Images will take 1120MB. Your desktop GPU will be able to handle this. a mobile GPU will have a hard time.

 

Thanks for the advice, I'll check if I can change the image resolution without loosing quality.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...