Javascript performance issue
All  1-3  4-8

Previous
Next
 From:  Max Smirnov (SMIRNOV)
6440.4 In reply to 6440.2 
>>any script code that's declared in the .htm file will run in the main process too
Great!! Thank you for the hint! Now it works very fast.

I am writing script which generates multiscatter data for Octane render. It's very handy to use MoI for this purpose. But I need to process huge amount of data in short time (100000 - 300000 points). Now it will work even faster than before. :) I'll finish it in couple days.

This is a test renders. Both scenes created in MoI. I spent 30 minutes making this.
First one: 6 objects, ~10000 instances. Second: 1 object, ~7000 instances.

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
6440.5 In reply to 6440.3 
Brian, thank you.
Sometimes I used this trick before, but I never thought about performance differences.

P.S. And thank you for your scripts! :)
I used Harmonic Trefoil script in this test.

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6440.6 In reply to 6440.4 
Nice looking results, Max!

I have some ideas for the future on how to try and make "out of process" scripts run faster, something like move objects that the script wants to access over into the worker process so that the script can have local access to them, and then after the script has done all its processing work move the results back into the main process. That's basically how an async "geometry factory" works right now but with C++ code.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Max Smirnov (SMIRNOV)
6440.7 In reply to 6440.6 
Thank you, Michael!

>>.. like move objects that the script wants to access over into the worker process so that the script can have local access to them..
Very good idea! It will really help.
I checked the performance and found that the bottleneck in my script are getStartPt and getEndPt functions (only 900 segments per second, while script can process about 1500 segments per second).
The overall performance is ~600 instances per second.
Tomorrow I will move some functions to htm file.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Max Smirnov (SMIRNOV)
6440.8 
Unbelievable!
I've got more than 10x boost!!

Normal mode:


Without 3D transformations:

EDITED: 7 Mar 2022 by SMIRNOV

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-3  4-8