Comments (3)
created reproducible example. it seems to be related to dynamic update, and creating full sets of new polygons each build
there was some discussion and i think its important to note a few things:
-
what things should trigger new state or modifying state. these checks need to be efficient (as in fast enough to be worth it over just rebuilding each time). in some cases it is OK to rebuild every time and not cache.
-
I had to use UniqueKey() in my workflow after changing from 7.0.0 -> 7.0.1 to restore some of the performance (UniqueKey skips the didModify widget checks which rebuilds the entire state every time and caches it. but the cache is obviously never used.) this resulted in performance somewhere between 7.0.0 -> 7.0.1 without any changes to my code.
-
I think this use case is fairly normal and a user could expect to change the values regularly. Im generally avoidant of micro-optimizations as they can often result in performance trade-offs that are not worth it OR might require strong documentation.
-
how can we make the polygon/polyline widget build behavior consistent and expected. i believe that #1904 was created to help maintain consistent behavior (see #1894 which it fixed), however at a huge performance cost. I want to look at a way to maintain good/expected behavior without adding too many checks in the way.
from flutter_map.
https://pub.dev/packages/collection
^
use this for list equality
from flutter_map.
fast_immutable_collections could be interesting as well because it caches the hashCode of its list types.
from flutter_map.
Related Issues (20)
- [BUG] `Polygon`s and `Polyline`s don't update when `points` modified HOT 5
- Tiles don't load after building a release apk HOT 1
- [BUG] Too high `package:meta` dependency constraint HOT 5
- [BUG] Overlapping `Polygon`s with same colors cause cutting HOT 3
- [BUG] Alternative polygon renderer in 7.0 renderers multiple holes incorrectly HOT 2
- [FEATURE] Drawing interactive polygons in real time HOT 3
- [BUG] Polygon simplification triggers crash on iOS in 7.0 HOT 7
- [FEATURE] Prevent pinch move while pinch zooming
- [BUG] FlutterFlow dependencies issue on meta 1.12.0 HOT 2
- [BUG] `Polygon` update detection doesn't detect changes to `holePointsList`
- [BUG] 7.0.1 MapOptions assertion fails even when new object instance is used HOT 1
- [FEATURE] Remove logger dependencies HOT 3
- [BUG] Polygon holes working incorrect in case of intersection and out of polygon coordinates HOT 6
- [BUG] Impeller causes crash when zooming into large OverlayImage HOT 4
- Support localization HOT 1
- [BUG] Constraint and Fit inside bound with same value causes Red Screen HOT 1
- [BUG] Unstable `PolygonLayer` & `PolylineLayer` HOT 3
- [WASM] Make WASM available in flutter web HOT 4
- [BUG] Holes in `Polygon`s do not always appear
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_map.