GithubHelp home page GithubHelp logo

Comments (5)

sandydoo avatar sandydoo commented on June 10, 2024

I won't deny that there's nothing to be optimized here, but there are things that are out of my scope. Yes, there is overhead with the component system. Yes, we don't need even half of what components offer. Yes, Ember and Google Maps run separate rendering loops with their own schedulers that fight each other. We can't mess with this part of the equation. Perhaps Ember Octane and its simpler components will reduce some of the overhead, perhaps it won't. Maybe custom components are the answer if and when they become available.
Also, I'd like to mention that 1000 markers is not a performance target I'm looking for for this addon. 100-200 is a more realistic target at the moment.

All of that is evaluated at render time despite no marker.infoWindow being shown at render time.

Yes, there is some expensive prep done to avoid rendering lag and weird layout issues when opening an info window. There is totally room for improvement here. You could also try reusing one info window, as suggested by google themselves.

What i've implemented in my own project is a markers-layer that receives all locations for me to render with an inner component for the marker window that's used for a yielded current location.

And this is totally fine. Write a custom component or copy paste what you need. Hopefully, we'll get to a point where you won't need it anymore.

I would advise not dwelling too much over this. We'll see what Ember Octane brings and move on from there. If you do have performance comparisons to post, anything specific you've found, etc, please do.

from ember-google-maps.

acorncom avatar acorncom commented on June 10, 2024

@mistahenry given that the 1000 marker scenario probably isn't the focus here, maybe you could develop an ember-maps addon that allows the same sort of declarative api for folks who have performance considerations?

ember-maps-performant-markers or something like that?

from ember-google-maps.

mistahenry avatar mistahenry commented on June 10, 2024

I would advise not dwelling too much over this.

Taking 12-15 seconds to transition into my route that shows my map on a Google Pixel 3 more or less forced me to dwell on it ;)

Also, I'd like to mention that 1000 markers is not a performance target I'm looking for for this addon. 100-200 is a more realistic target at the moment.

This might be helpful disclaimer in the README. I assumed that I could just enhance this addon to cluster when I had lots of pins, but the current architecture makes that a nonstarter.

I'll close the issue as out of scope of this project

from ember-google-maps.

mistahenry avatar mistahenry commented on June 10, 2024

@acorncom that's the plan with clustering built in.

from ember-google-maps.

sandydoo avatar sandydoo commented on June 10, 2024

@mistahenry, in case you're interested, I've published a test app that I've been using to measure the performance of the markers here. Results will vary based on hardware and dev/production build.

ember-google-maps-performance-test

Some results

Perhaps Ember Octane and its simpler components will reduce some of the overhead

  • The simpler Glimmer components drastically cut down setup time. There is still substantial overhead.

  • Custom components save comparatively little over Glimmer components, since there isn't much else we can cut out from the rendering loop. 😞 Maybe someone knows a way we can create simple functional components? i.e. no rendering, just a method call?

  • Helper components are slightly faster that Glimmer components, but are a no-go for some of the more complex components.

  • Drawing markers in js is, of course, the best option. However, 1000 markers are still a non-trivial amount.

from ember-google-maps.

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.