Skip to content
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

fix: 1874 - fixed side-effect crash for final dot / final dash #1875

Merged
merged 1 commit into from
May 7, 2024

Conversation

monsieurtanuki
Copy link
Contributor

Fixed a side-effect crash for both final dot and final dash.
Still, the display may look funny on final dash mode with PatternFit.extendFinalDash, but that's probably how it's supposed to work (e.g. not well at the end in special cases).

@josxha josxha added this to the v7.0 milestone May 6, 2024
@josxha josxha linked an issue May 6, 2024 that may be closed by this pull request
@josxha
Copy link
Contributor

josxha commented May 6, 2024

Thanks a lot for providing a pull request this quickly, @monsieurtanuki! I can confirm that this fixes the bug.

@monsieurtanuki
Copy link
Contributor Author

Thank you @josxha for your review and for having put enough details in the issue (video + log) for a quick fix.

Still a bit worried about possibly slower performances of the new dash/dot/solid algorithm: is there a sort of unit test dedicated to polygon performances?

There may also be minor interferences between culling and dash/dot algorithm: if geopoints are preventively dismissed as "too far away", the dash pattern change (e.g. as starting from a different geopoint).

@JaffaKetchup
Copy link
Member

The best way to test performance is to build in release or profile, then use the Polygon/Polylines Stress Test in the example app. Disable "Performant Rendering", and try changing the thickness of the line. Then compare the performance graphs at the bottom (not available on web) to an older version.

@monsieurtanuki
Copy link
Contributor Author

From data I've just gathered, the previous code is slightly better in extreme conditions, but the current PR is similar in normal conditions.

Optimization tracks (beyond this PR):

But I would recommend merging the current PR quickly, as it fixes a crash for dashed and dotted

x latest PR previous code
optim Screenshot_20240507_103052 Screenshot_20240507_104342
no optim Screenshot_20240507_103119 Screenshot_20240507_104403

@josxha
Copy link
Contributor

josxha commented May 7, 2024

But I would recommend merging the current PR quickly, as it fixes a crash for dashed and dotted

Agree 👍🏼

@josxha josxha merged commit 4491d1e into fleaflet:master May 7, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG (v7)] Dotted polyline throws exception: Bad state: No element
3 participants