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

Add plot_structure function using Makie.jl #4

Merged
merged 8 commits into from
May 4, 2022

Conversation

timoleistner
Copy link
Contributor

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:

  • Add CairoMakie to the Project.toml
  • Update README.md Usage part; proposal:
    plot_structure("((...))"; sequence = "AAAAAAA")

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:
- Add CairoMakie to the Project.toml
- Update README.md Usage part; proposal:
    plot_structure("((...))"; sequence = "AAAAAAA")
Copy link
Owner

@marcom marcom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks! I have added a few cosmetic suggestions. I think we merge the new function under the name plot_structure_makie and then test it a bit. Once we are happy the old version can be removed.

src/plot_structure.jl Outdated Show resolved Hide resolved
src/plot_structure.jl Outdated Show resolved Hide resolved
src/plot_structure.jl Outdated Show resolved Hide resolved
src/plot_structure.jl Outdated Show resolved Hide resolved
@marcom marcom merged commit 6143ee3 into marcom:main May 4, 2022
@marcom
Copy link
Owner

marcom commented May 4, 2022

Many thanks!

@marcom
Copy link
Owner

marcom commented May 4, 2022

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
Copy link
Contributor Author

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

@marcom
Copy link
Owner

marcom commented May 6, 2022

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
JuliaLang/julia#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.

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.

2 participants