-
-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking: Performance Issues #1165
Comments
Hello 👋 I am new to the repo so apologies if this is not the right place. Thanks for all the hard work thus far 👍 I have been reading through the code and having a play and noticed there are some performance improvements that could be made. I then noticed this issue. Unsure if you are accepting PRs but would be happy to help. For example I have noticed we work with The WMS implementation looks like it has caused some ripple effects through the code too, for example when dealing with urlTemplate and then having to force unwrap it etc. I've seen notes in the code so I'm late to this party. I think there's some general widget improvements (removing un-needed ones) and some newer language features to help out too. Happy to help but didn't want to waste my time either if its not needed. |
Help is always wanted :), and all suggestions and PRs welcome ! So feel free and great to have others interested. Whilst all optimisations welcome, I would also say as a general programming thing, I wouldn't get too hung up on microoptimisations and let it eat up your previous dev time, there are normally bigger fish to fry with performance. |
I was experiencing very bad performance when I am showing some very basic lines (thickness only to 1), Then after researching I made this modification in the drawing method of the PolyLine layer Instead of using
|
I think that makes sense, and if we were to rewrite it (or write a new plugin for polylines/gons then I'd be tempted to do some caching of the offsets (and likely paths) similar to the recent marker changes. I'm a little surprised that its so different in performance though for basic lines, or are there a lot of them ? |
i will try to make it as plugin |
That's great, just shout if you get stuck. |
hi, what about that? |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Hello! Thank you for the amazing package. Just wanted to mention that performance with Safari on macOS is pretty terrible, I think due to this issue: flutter/flutter#96869 Scrolling around on a map can easily cause Safari to use several gigabytes of memory, not fun |
How are you trying to use it with a large image ? |
Also a minimal example with an image would be useful. |
I'm not trying to use it with an image; it happens with any usage of flutter_map in Safari, just from it loading map tiles. It's a Flutter issue, unless flutter_map is somehow not releasing offscreen images. |
Oh ok, I don't get any issues on my Safari (hovers around 62M, but I may be using an older version that I'm testing, I'll try and rebuild when I get chance). Have you tried building to html rather than canvas to see if that helps ? |
Many common performance issues have been fixed, and are now a result of a mixture between misconfiguration and unclear documentation and implementation. For example, one major factor seems to be the persistent usage of This vagueness should be fixed by v3.0.0 (see #1333), which changes the internal and public implementations of map layers. This forces a more performance friendly implementation by removing places where mistakes can be made, as well as harnessing the full power of Flutter's widget system. The situation will be re-reviewed after v3, if necessary. PS. This is not to say there aren't any performance issues, such as some of the ones discussed in this thread, but many are due to the reasons explained above. |
This issue aims to help track the multiple performance issues, so it's easier to handle them by linking them together, fixing them, or closing them.
There are likely to be more added in the future.
Fixed/ignored (closed) issues:
The text was updated successfully, but these errors were encountered: