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

azur theme has efficiency problem #425

Open
scmorse opened this issue Jul 12, 2020 · 3 comments
Open

azur theme has efficiency problem #425

scmorse opened this issue Jul 12, 2020 · 3 comments

Comments

@scmorse
Copy link

scmorse commented Jul 12, 2020

I'm not sure what it is, but in my application (where I might open and close the gallery many times), the azur theme seems to continue working in the background and use up a lot of CPU. I switched to twelve theme because of it.

Also, I sincerely appreciate this project. I tried to use two other gallery libs before this, and couldn't get them to work at all. This one works and looks great. I couldn't find a place to donate, but if anyone can point me, I'd happily donate to support development on this project.

@sammik
Copy link

sammik commented Jul 13, 2020

I think, only major difference between Azur an Twelve is, that Azur uses canvas for some visual effects.
Open and close galleries, You mean, they are running at background, but hidden, or you destroy and start it every time?

@scmorse
Copy link
Author

scmorse commented Jul 14, 2020

So in my app, the user would initialize the gallery and then remove it from the dom many times, but I couldn't find a way to shut off the gallery code after it has been initialized. In azur, there was some loop() function, which does look related to the canvas you mentioned, which kept running after the gallery was destroyed.

@sammik
Copy link

sammik commented Jul 14, 2020

Did you try API method "destroy"? https://galleriajs.github.io/docs/api/methods.html#destroy
If it doesnt work, you may try to hack a theme, for me, it seem s to be most easy to disable canvas (comment out line 76, but dont forget to change "," to ";" in previous line
https://github.com/GalleriaJS/galleria/blob/master/src/themes/azur/galleria.azur.js#L76

Not sure, if it can help, just a first idea.

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

No branches or pull requests

2 participants