Giter Site home page Giter Site logo

Comments (7)

panaaj avatar panaaj commented on July 17, 2024

Commit #f373a8b addresses this issue.

from freeboard-sk.

tkurki avatar tkurki commented on July 17, 2024

I have absolutely no idea how Angular works, but based on the cursory peek into the code it looks to me that you are looping over all the accumulated data for each incoming delta, instead of just updating the part that is actually updated. This not just for ais targets, but all data.

Do you have logic to remove stale ais targets? Deltas just stop for them when they go out of range.

from freeboard-sk.

panaaj avatar panaaj commented on July 17, 2024

It is best practise in Angular to use immutable objects where possible to support accurate and efficient change detection, especially where arrays and objects are involved.

So in the example of AIS targets... the underlying Map object is updated in a targeted way but if used as the component data source change detection will not necessarily see the individual attribute changes and trigger an update.... hence building the current values into an immutable array and providing it as the data source.

That being said I am continuing to tune the 'message processing' now that the major performance obstacle seems to be resolved. Once we are happy it is resolved I will add the removal of stale AIS targets.
Just so we are all on the same page: Stale= no update in a prescribed period, so open suggestions as to what is considered a reasonable prescribed period as I know there are likely to be different opinions here.

from freeboard-sk.

panaaj avatar panaaj commented on July 17, 2024

Commit #de7ff8a streamlines onMessage handling and also AIS target rendering.
Stale AIS targets (no update in the last hr) are removed.

from freeboard-sk.

panaaj avatar panaaj commented on July 17, 2024

Commit #17f26a6 should now close this.

Active = last update received < 3 mins
Inactive= last update received > 6 mins
Removed when last update received > 9 mins

from freeboard-sk.

joabakk avatar joabakk commented on July 17, 2024

This is sound practice for most use cases, but for a kiosk showing hourly updates worldwide from Marinetraffic or similar, I would like to have this user configurable.

from freeboard-sk.

panaaj avatar panaaj commented on July 17, 2024

Fixed and available in 1.0.0-0 pre-release.

from freeboard-sk.

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.