Giter VIP home page Giter VIP logo

Comments (4)

nicksnyder avatar nicksnyder commented on May 29, 2024

Thanks for reporting!

I am not familiar with DWURecyclingAlert but based on the README it triggers for two reasons:

Displays non-recycled UIView, CALayer and UIImage objects with bold red bolders.
Displays the time it takes to complete each time sensitive API calls, in milliseconds.

LayoutKit does not reuse views by default so my guess is that is causing the alert (and not necessarily that it is slow). 8ms doesn't seem that bad since the README also says this:

Your code usually has less than ten milliseconds to run before it causes a frame drop.

What hardware did you test on?

LayoutKit will reuse views if a layout has a viewReuseId. For the feed example, you can try adding viewReuseId parameters to all of the LabelLayouts and SizeLayout<UIImageView>s in ProfileCardLayout, FeedItemLayout, and ContentLayout to see (1) if that gets rid of the warning and more importantly (2) if it actually improves performance.

If it does improve performance, feel free to submit a PR to make those changes to the example layouts (they were created before viewReuseId existed).

Collecting this data would also help inform how beneficial #58 would be.

from layoutkit.

nicksnyder avatar nicksnyder commented on May 29, 2024

I experimented with viewReuseId and it does noticeably improve performance.

#63 updates the example layouts.

from layoutkit.

ezrover avatar ezrover commented on May 29, 2024

Excellent, Thank you Nick.

Cheers,
Nader Rahimizad

from layoutkit.

nicksnyder avatar nicksnyder commented on May 29, 2024

For clarification, if/when #58 is resolved it may not be necessary to specify viewReuseIds everywhere to get better performance (it would only be necessary for animations).

from layoutkit.

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.