marcom / ViennaRNA.jl

Julia interface to ViennaRNA for RNA structure prediction and analysis
Other
21 stars 1 forks source link

Add plot_structure function using Makie.jl #4

Closed timoleistner closed 2 years ago

timoleistner commented 2 years ago

I've proposed my plotting function while leaving your code untouched. Either keep both and rename accordingly (plot_structure_makie() or something) or remove your code. The circular layout looks weird but imo its a useless representation anyway. TODO:

marcom commented 2 years ago

Many thanks!

marcom commented 2 years ago

Time to first plot is the only problem at the moment, it went from <1s (Luxor) to ~40s (Makie). I tried to improve it with precompile statements but no luck so far.

timoleistner commented 2 years ago

This seems to be a general julia problem.. I've tried with different backends of Makie (GLMakie & WGLMakie) without improvements.

marcom commented 2 years ago

Yes, i think there is a lot of work going on in Julia to fix this by doing more caching. As far as i understand, at the moment, precompilation only saves time on inference and doesn't result in generated machine code being cached.

Some more reading if you are interested https://discourse.julialang.org/t/precompile-why/78770/8 https://github.com/JuliaLang/julia/pull/44527 https://gist.github.com/JeffBezanson/dd86043ef867954bd7e2163ab66f8b4e

So sometime in the future it should all be better.

There might be something going on with invalidations (and Makie?), because adding precompile statements like they do in Makie actually made it even slower (50s vs 40s). Some more info here: https://julialang.org/blog/2020/08/invalidations/

I probably won't have a lot of time to investigate this in the next few months.

Until then i'll open an issue in this repo so that we don't forget about it.