Code Monkey home page Code Monkey logo

Comments (6)

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024

Update...

  • Use global (this.lovelace) colorcache instead of cache per card
  • Remove client-width call (seems not be used anymore)
  • Remove most of the spread operators, replace with Merge.mergeDeep() call

Result for air-quality view: from 462.8ms --> 212.8ms !!
image

from swiss-army-knife-card.

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024

Update...

  • for segarc: don't create background and foreground styling (is static) if already created

Result again for air-quality view. From 212.8ms --> 136.4ms !! (original: 462ms, ie 326.4ms less!)
image

from swiss-army-knife-card.

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024

Small update this time.

  • optimize rendering state style strings

image

With these small increments, the air-quality view with 25 sak cards will probably end up somewhere between 100-120ms I guess, which would be great compared to the start with 462ms 😄

The sake2 view is now just below 100ms. This one also used to be between 300-400ms.
image

from swiss-army-knife-card.

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024

Switching from say the sake2 view to the air-quality view, where the view was already created/rendered before shows a very small processing time of around 6ms:

image

This time is from the (dis)onnectedCallback() function and interval processing for the history bar tool.

Other cards:

  • decluttering card is much more expensive while switching, using 36.4ms.
  • AirVisual card only needs 3ms.
  • button-card (used for the three menu buttons) needs 5.1ms

from swiss-army-knife-card.

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024

So far so good.

from swiss-army-knife-card.

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024

Update for the air quality card.
After many updates still around 120ms, where the colorstuff for all the history cards (using a minmaxgradient!!) is the largest cpu cycle user:

image

from swiss-army-knife-card.

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.