-
-
Notifications
You must be signed in to change notification settings - Fork 717
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
WorkerTransfer benchmark 3x slower on main
compared to v2.1.1
#981
Comments
Yes, this is more like a factor of 4.5. But last time I run it, it was 30 ms. Would be helpful if someone could run this command and post the benchmark results here. Maybe it is machine-specific... |
#941 also comes to mind as it adds another type to web worker transfer, which is exactly that test. ? |
I agree we should release a new version soon, I doubt that changing the worker code that was a simple replacement of file would've affected the performance, but everything is possible... :-) |
or on cli |
See my comment here: |
Happened to me too. |
It's a different issue, I don't think it is related to the worker transfer performance, or 2.1.1 is faster because this fails fast :-) |
This probably needs a bisect... :-( too late for me though... |
I found something... checking out the commit from v 2.1.1, and somehow it's different from v2.1.1 column. The third colum is commit (f47e53c), and it should really be the same as the first. |
If we uploaded a generated benchmark file that doesn't properly use the web worker might it explain it? |
I'm talking about this PR: #704 |
I wanted to see if this happens also in previous version, and I'm getting the following results:
So it seems that for some reason the first run is very fast but the next runs are not. I don't have a clue what can cause this though. |
My current hypothesis is that workers are created for the first run, but never terminated, and thus maybe blocking them from launching in the other runs. So if I'm not mistaken, this indicates that web workers make a huge difference, and we could in principle release 2.1.2 and expect it to have the same performance as 2.1.1. |
I think we should release 2.1.2, even today. |
I have investigated a bit, and the only way the worker poll is being terminated is through: Map._updateStyle() > Style._remove(); > Dispatcher.remove(); > WorkerPool.release() So if we could also release the worker pool after each benchmark, that would probably help. |
Also, I tried to add a worker.terminate() in the WorkerTransfer teardown function, as we should clean it up properly. |
All the map workers start when we trigger function loadScript(src) {
return new Promise((resolve, reject) => {
const s = document.createElement('script');
s.src = src;
s.onload = resolve;
s.onerror = reject;
document.head.appendChild(s);
});
} It would be much easier if we could use the maplibre api directly from the benchmarks, instead of going through benchmarks_generated.js |
Yup, see #982 . |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
The WorkerTransfer benchmarks is 3x slower on
main
compared tov2.1.1
.@HarelM @birkskyum, might recent changes have something to do with this?
Steps to reproduce:
The text was updated successfully, but these errors were encountered: