Nativescript: benchmark information for web workers

Created on 5 Nov 2016  路  4Comments  路  Source: NativeScript/NativeScript

Is there any nativescript web worker benchmark information like this for firefox:
screenshots_2016-11-05-23-53-31

Image reference : https://hacks.mozilla.org/2015/07/how-fast-are-web-workers/

question

Most helpful comment

@kazemihabib you definitely should! Benchmarks proved to be very subjective depending on whether they are ran on a device or emulator, processor, available memory. We have some stress tests on Workers, where sending a 5000-character message can take as little as a few dozen _ms_ on newer devices to a tad bit more on old ones.

https://github.com/NativeScript/common-runtime-tests-app/blob/master/Workers/index.js

Instantiation of a Worker takes very little time on the main thread, as most of the work is done on the new thread.

All 4 comments

@kazemihabib no, there isn't one yet. What exactly would you like to see? As with any other mobile feature most of the metrics depend on the device workers are used on. For example, web workers will instantiate much slower on a Nexus 4 device, than they would on a Nexus 5, and even slower compared to Nexus 5X.

And the same applies to maximum message sizes - depends on RAM availability.

ping @ivanbuhov

thanks @Pip3r4o , I need to know the latency and max message size of post message.
because I call a function every 200ms , and do _.sortedIndex in that function and get the result of it.
so I need to know the latency and max message size to know should I use workers or not ! (I should call postMessage two times every 200ms one for call and one for get result).
if it's different on devices maybe I should try it on multiple devices to know should I use workers or not

@kazemihabib you definitely should! Benchmarks proved to be very subjective depending on whether they are ran on a device or emulator, processor, available memory. We have some stress tests on Workers, where sending a 5000-character message can take as little as a few dozen _ms_ on newer devices to a tad bit more on old ones.

https://github.com/NativeScript/common-runtime-tests-app/blob/master/Workers/index.js

Instantiation of a Worker takes very little time on the main thread, as most of the work is done on the new thread.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings