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

FPS falls dramaticly when width of stroke of lineString is more then 1 #12350

Closed
Lamzar opened this issue May 24, 2021 · 2 comments
Closed

FPS falls dramaticly when width of stroke of lineString is more then 1 #12350

Lamzar opened this issue May 24, 2021 · 2 comments
Labels

Comments

@Lamzar
Copy link

Lamzar commented May 24, 2021

OL 6.5. I have a lot of lineStrings on the map (> 8000) and I use simple style function which sets only stroke color with some width:

var styles = {
  'LineString': [
   new ol.style.Style({
		stroke: new ol.style.Stroke({
		  color: 'green',
		  width: 4,
		})
	})
   ]
};

var styleFunction = function (feature) {
  return styles[feature.getGeometry().getType()];
};

The questions:

  1. If I set width to 1, I have sutisfying FPS. But if I change the width to any other value, even 1.0001, FPS falls dramaticly. I prepared the sample: https://jsfiddle.net/Lamzar/36zu2oay/15/ and also attached the index.html file with this sample.
  2. Does anyone know why Firefox renders lines on the map about a twice or more quickly then Chrome? The described above problem with width also takes place in Firefox, but nevertheless it handles with it with greater performance.

index.zip

@ibrierley
Copy link

I'm wondering if this is related to Skia...I think Chrome uses that behind the scenes, apologies if wrong. I noted a similar issue with Flutter I was looking at flutter/flutter#78543 (comment)

@stale
Copy link

stale bot commented Sep 3, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 3, 2021
@stale stale bot closed this as completed Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants