Coder Social home page Coder Social logo

App Exits Randomly about historyofeverything HOT 5 OPEN

2d-inc avatar 2d-inc commented on July 30, 2024
App Exits Randomly

from historyofeverything.

Comments (5)

filiph avatar filiph commented on July 30, 2024

I think I've seen this as well, in profile (~= production) mode. No error was logged.

from historyofeverything.

luigi-rosso avatar luigi-rosso commented on July 30, 2024

After first opening the timeline in profile mode, I saw memory usage around 720MB.
screen shot 2018-11-04 at 11 08 53 am

After scrolling around a bit it popped to 770 with a peak of 899. This seems crazy high to me.

I think the reason our memory usage is so high is because the images need to be decoded and stored as raw RGBA at runtime. I also think SKIA must be generating mipmaps for them for the filtering.

We exported them at best quality from Nima, but this isn't really necessary as we render at a much lower resolution in the app. I can write a script that goes through and resizes the atlases. I'll move all the originals into a new folder and have a script that can be run to re-generate the ones in the assets folder from the originals. That way we can play around with different resolutions and see which is the best balance for memory/quality.

from historyofeverything.

luigi-rosso avatar luigi-rosso commented on July 30, 2024

More proof that it's the images. These lists of images are the arrays of atlases each actor stores.

screen shot 2018-11-04 at 11 18 32 am

from historyofeverything.

luigi-rosso avatar luigi-rosso commented on July 30, 2024

If I 1/4 (512x512 max) the images, it goes down to 220MB. Quality is bad.
At 1/2 (1024x1024 max) the images, it goes down to 443.8MB. Quality change is only noticeable in some cases, but generally seems good.

A few more options:
Change some of the larger images (the galaxy, the big bang) to Flare (vector) animations. These seem like an easy win.

Look into loading the assets on demand instead of everything at boot.

from historyofeverything.

luigi-rosso avatar luigi-rosso commented on July 30, 2024

There are two utility scripts: tools/resize_large_assets.dart and tools/find_large_assets.dart

from historyofeverything.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.