Jump to content

SPS Optimization : Feedback Wanted


jerome
 Share

Recommended Posts

Hi people,

One of our new contributor (a good damn one apparently) just did a nice refactorization of the SPS code in order to get (even) better perfs.

The first tests are really promising but we need more feedback from different OS, devices, browsers to validate this great work.

So please, get there : http://jerome.bousquie.fr/BJS/test/SPSRefactor/

How to test ?
Compare, in the same browser with the same window size, both SPS versions with the same particle number.
Please don't open it in two tabs simultaneously to be sure to keep only one WebGL context instanciated at the same moment. As well, don't run two browsers with this demo simultaneously.

Please wait for some seconds (20") after the start so as the GC has finished its cleanup before comparing. Then nothing more is allocated nor deleted. You should see then a quite stabilized fps value.

The comparison is better, say more pertinent, when the model is stressed, it is to say when the number of animated particles prevents from reaching the 60 fps : it's easier to check out the gain or the loss between both versions. So please choose a fixed particle number that will keep the fps between 5 and 45 for instance in all your attempts.

Please feedback in this thread like this :

Device / OS /particle number / Browser / stabilized fps  legacy / stabilized fps refactored

We don't really care about the GPU because everything is compared CPU side. If you don't know some pieces of information, please report at least the browser name and the fps value of each sps version : legacy first, refactored second.

example :

Workstation i7 quadcore / Linux / 20K / Chrome / 31 fps / 12 fps

or

Firefox / 13 fps / 14 fps

Thank you

Link to comment
Share on other sites

That's cool :)

Here are my results on i5-750 (old quadcore) + Windows 10:

12K Firefox / 34 FPS / 30 FPS

12K Chrome / 24 FPS / 47 FPS

24K Firefox / 18 FPS / 15 FPS

24K Chrome / 12 FPS / 24 FPS

 

So for me it looks like the refactored version is a bit (~10%) slower on firefox, but a lot (~100%) faster on chrome.

Link to comment
Share on other sites

Windows 10 -- CPU i5-2300 -- GPU GTX 1050 ti -- Chrome 69 :

Result :

Of 2000 to 8000 => 44FPS (Legacy)

Of 2000 to 10000 => 60FPS (refactored)

-----------------------

Legacy: 12 000 particle => 31 FPS

refactored: 12 000 particle => 53 FPS

-----------------------

Legacy: 14 000 particle => 27 FPS

refactored: 14 000 particle => 46 FPS

----------------------

Legacy: 20 000 particle => 18 FPS

refactored: 20 000 particle => 32 FPS

-----------------

Legacy: 40 000 particle => 11 FPS

refactored: 40 000 particle => 17 FPS

 

For me the refactored version doubles the performance.

Super optimization.

 

Link to comment
Share on other sites

i3 - 4005U / Windows 10 / 2K / Firefox / 38 - 44 fps / 38-44 fps

i3 - 4005U / Windows 10 / 2K / Chrome / 32 - 34 fps / 37-40 fps

i3 - 4005U / Windows 10 / 2K /Edge / 36 - 45 fps / 47-52 fps 

 

i3 - 4005U / Windows 10 / 40K / Firefox / 3 - 4 fps / 3-4 fps

i3 - 4005U / Windows 10 / 40K / Chrome / 3 fps / 5 fps

i3 - 4005U / Windows 10 / 40K /Edge / 2 fps / 4 fps 

 

Android 7.1.1 / 2K / Chrome / 12 fps / 27 fps

Link to comment
Share on other sites

Hi, here are some results:

Laptop
Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz (4 CPUs), ~2.3GHz
Windows 7 / 2K / IE11 / 40 fps / 60 fps
Windows 7 / 10K / IE11 / 10 fps / 21 fps
Windows 7 / 20K / IE11 / 5 fps / 12 fps

Laptop
Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 CPUs), ~2.3GHz
Windows 10 / Edge 42.17134.1.0 / 10K / 30 fps / 33 fps
Windows 10 / Edge 42.17134.1.0 / 20K / 15 fps / 18 fps
Windows 10 / Firefox 62.0.2 / 10K / 47 fps / 36 fps
Windows 10 / Firefox 62.0.2 / 20K / 22 fps / 21 fps
Windows 10 / Chrome 69.0.3497.100 / 10K / 32 fps / 45 fps
Windows 10 / Chrome 69.0.3497.100 / 20K / 17 fps / 26 fps

Smartphone
Qualcomm Snapdragon quadcore 2,5 GHz
Android 6.0.1 / Firefox 62.0 / 2K / ~23 fps / ~19 fps
Android 6.0.1 / Firefox 62.0 / 10K / 6 fps / 6 fps
Android 6.0.1 / Chrome 69.0.3497.100 / 2K / ~24 fps / ~44 fps
Android 6.0.1 / Chrome 69.0.3497.100 / 10K / 6 fps / 6 fps

 

Link to comment
Share on other sites

i7-4720HQ / Windows 10
10k
Chrome 43-44fps / 57-60fps
Firefox 54-55fps / 49-52fps

40k
Chrome 11-12fps / 17-19fps
Firefox 15-16fps/ 13-15fps

MediaTek Helio X20 / Android 6

Chrome and Firefox - not visible difference
2k 35-45fps / 39-50fps

I noticed that on mobile sps slow down every second aprox, for few miliseconds, here fps go down, after that go normal fps is higher.
;)
 

Link to comment
Share on other sites

MacBook Pro 13" 2017 MacOS High Sierra 10.13.6, Intel Core i5 @ 2.3GHz, 8 GB

Chrome 69.0.3497.100

2K / 60 FPS / 60 FPS
10K / 50 FPS / 60 FPS
20K / 27 FPS / 47 FPS
40K / 14 FPS / 24 FPS

Firefox 62.0.2

2K / 60 FPS / 60 FPS
10K / 44 FPS / 40 FPS
20K / 34 FPS / 30 FPS
40K / 20 FPS / 18 FPS

Note: Average stable frame rates but there were periodic dramatic (>10fps) dips in frame rate (both legacy and refactored)

Safari 12.0

2K / 60 FPS / 60 FPS
10K / 50 FPS / 60 FPS
20K / 30 FPS / 30 FPS
40K / 20 FPS / 20 FPS

Link to comment
Share on other sites

Thanks to all of you for this important and fast feedback.

This has showed that the SPS code refactorization has the very same results whatever the OS or the device :

- huge gain in Chrome from +25% up to +100% speed

- relative loss in Firefox, around -15%  (please FF devs : why ???)

- no impact or very small gain on the other browsers

The PR will be merged soon. All credits and congratulations to its author : @BabarJulien

The relative perf loss in FF doesn't really matter. Indeed the demo you've tested is a stress test, an extreme scene that users usually don't build : 20K or more solid particles are hardly visible when set apart from each other in the screen area. A good practice is too manage less solid particles and to worry only about those visible in the frustum by recycling them.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...