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

fix #5015 Increase performance of some Generators #5016

Merged
merged 4 commits into from
Oct 20, 2023

Conversation

satabol
Copy link
Collaborator

@satabol satabol commented Oct 7, 2023

fix #5015
Sverchok 1.3.0-alpha, Blender 3.6.x, Windows 11

  • need code review or approve. Ready to merge.

update performance for the next items:

  • Generators (NGon, Circle, Cylinder, Sphere, Torus)
  • Generators\Generators extended (Hilbert 3D, Torus Knot, Ring, Ellipse, Super Ellipsoid, Spiral [Archimedian, Logarithmic, Spherical, Ovoidal, Curnu, Exo] )

image

Increase Circle node performance (in this test from 234ms to 18ms):

file for tests: fix_5015.Circle_performance_tests.001.blend.zip

image

- generator/circle.py
- generator/ngon.py
- generator/sphere.py
- generator/torus_mk2.py
- generators_extended/ellipse_mk3.py
- generators_extended/hilbert3d.py
- generators_extended/ring_mk2.py
- generators_extended/spiral_mk2.py
- generators_extended/super_ellipsoid.py
- generators_extended/torus_knot_mk2.py
@satabol
Copy link
Collaborator Author

satabol commented Oct 10, 2023

Performance of some generators:

image

  • generator/ngon.py (73ms->12ms -> 6 times)
  • generator/circle.py (234ms->18ms -> 13 times)
  • generator/sphere.py (353ms->70ms ->5 times )
  • generator/torus_mk2.py (176ms->32ms -> 5 times)
  • generators_extended/hilbert3d.py (47ms->33ms -> 1.5 times (only edges optimization) )
  • generators_extended/torus_knot_mk2.py (283ms->30ms -> 9.5 times)
  • generators_extended/ellipse_mk3.py (227ms->13ms -> 17 times)
  • generators_extended/ring_mk2.py (325ms->20ms -> 16 times )
  • generators_extended/super_ellipsoid.py (671ms->30ms-> 22 times)
  • generators_extended/spiral_mk2.py (Archimedian/Logariphmic: 719ms->101ms->7 times, Spherical: 1478ms->104ms->15 times, Ovoidal: 1861ms->120ms->15 times, Cornu[with integration]: 44000ms->10325ms-> 4.2 times, Exo: 1837ms->117ms-> 14 times )

Files for tests:
issue_5015_some_nodes_performance.v001.zip

Can somebody test this PR?


Generators->NGon

image


Generators->Sphere

image


Generators->Torus

image


Generators Extended->Hilbert 3D

image


Generators Extended->Torus Knot

image


Generators Extended->Ring

image


Generators Extended->Ellipse

image


Generators Extended->Super Ellipsoid

image


Generators Extended->Spiral

image

@satabol satabol mentioned this pull request Oct 10, 2023
@satabol satabol changed the title fix #5015 Increase performance of Generator->Circle node. fix #5015 Increase performance of some Generators Oct 10, 2023
@satabol
Copy link
Collaborator Author

satabol commented Oct 12, 2023

Increase performance for node Surfaces->Evaluate Surface (for grid mode).

With connected Edges and faces performance increased 345ms->209ms -> 1.6 time
Without connected Edges and faces performance increased 345ms->184ms -> 1.8 time

file for tests: issue_5015.Surfaces.EvaluateSurface.blend.zip

image

@satabol
Copy link
Collaborator Author

satabol commented Oct 14, 2023

Generators->Cylinder performance:
143ms->25ms->5 times

file for tests:
issue_5015.Generators.Cylinder.blend.zip

image

@satabol satabol merged commit 01498b7 into master Oct 20, 2023
@satabol satabol deleted the fix_5015_Circle_performance branch October 20, 2023 19:21
satabol added a commit that referenced this pull request Oct 21, 2023
fix #5016. Some generators has errors after refactor to numpy. Fixed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Circle Performance
1 participant