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

Benchmarks; Improve performance #396

Open
Sov-trotter opened this issue Aug 13, 2021 · 3 comments
Open

Benchmarks; Improve performance #396

Sov-trotter opened this issue Aug 13, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@Sov-trotter
Copy link
Member

Sov-trotter commented Aug 13, 2021

We have been constantly adding lots of features to base javis and I think now is the right time to measure their performance impact.

A good way to start would be

  • comparing rendering times for scripts with no_layers - before and after merging layers.
  • Precompilation times after introducing shorthands.

This issue also covers future performance improvements.
Precompile times :
Ref: https://discourse.julialang.org/t/22-seconds-to-3-and-now-more-lets-fix-all-of-the-differentialequations-jl-universe-compile-times/66313

Internally, I think speeding up rendering is the only major thing, which in itself includes three parts:

  • Rendering of objects
  • Computations for Actions
  • Layers(rendering, actions, layer caches)
  • Misc. Image matrices etc.

IMO all of these can use individual Profiling.
https://www.youtube.com/watch?v=wXRMwJdEjX4

@Sov-trotter Sov-trotter added the enhancement New feature or request label Aug 13, 2021
@Sov-trotter Sov-trotter changed the title Benchmarks Improve performance Benchmarks; Improve performance Aug 13, 2021
@Wikunia
Copy link
Member

Wikunia commented Aug 14, 2021

Yeah I think it would be great to have some test animations with profiling and getting a good overview of the parts that take the most time and share it here.

@Wikunia
Copy link
Member

Wikunia commented Sep 12, 2021

Example inverse kinematics

https://gist.github.com/Wikunia/febbb3b40071d5273d5fa4b0bc1dde6d

Profiling that without rendering to a gif/mp4 gives
~50% time spend in get_javis_frame

  • ~ 6% in image_as_matrix
  • ~ 40% drawing circles 😄

~ 43% save images

But with rendering it to a gif ~50% is doing all of the above and the other 50% on rendering which seems quite a lot

@Wikunia
Copy link
Member

Wikunia commented Sep 12, 2021

Example Layers Tutorial

See: #414

Without rendering as well:
~ 80% in get_javis_frame

  • ~20% in get_layer_frame
  • ~50% in place_layers

~16% in save

With gif:
Same as above but with 14% rendering time of overall time.

In general seems like there isn't much we can do with Javis itself while keeping the same structure for @JLayer and placing images is quite expensive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants