-
Notifications
You must be signed in to change notification settings - Fork 76
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
Failing to port a "realistic" filter design tool #271
Comments
Not a real solution but a couple of comments:
As a separate issues, once this is sorted out, it be nice to start collecting all these apps package authors are doing using Interact in some "ecosystem" tab in the docs. |
I have been meaning to try out Blink for a few months now (I have always found the IJulia framework to be slow and unpredictable).... ...But I get the following error with Julia v1.0 on 18.04:
Comments
|
Concerning Blink, I wonder whether you're hitting JuliaGizmos/Blink.jl#128 and the fix in JuliaGizmos/Blink.jl#128 (comment) would fix it for you. For the notebook, I've been testing it locally and if I run jupyter from terminal I start getting:
Maybe some issues with the exchange of information between the notebook and InspectDR? I'm really not sure. Could be useful to compare with Blink. Also, there seems to be some strong flickering with the plot, I'm not sure where that comes from and if it can be fixed on the InspectDR side. |
Thanks for the links. I guess I should have checked the issues with Blink first. The HTTP messages are interesting. I do not see those; maybe I should figure out how to run Jupyter from the terminal (it might end up being faster as well?). I might also need to learn how to use those programs that read socket traffic. Flickering plot: I must admit I cannot see the flickering when I remove the plot from the list of displayed objects (only the widgets are displayed)... On the other hand, I believe there was still flickering when I plotted from the external Gtk application (not sending an image back to Jupyter). I wonder if it could have something to do with messages being stalled while the plot is being rendered (a relatively slow process)... I guess I have a few things to figure out. Thanks. |
Blink TestsI just pushed a version of 2_interact.jl specialized for Blink: Wow! Thanks for pointing me to Blink. My filter design tool is both very robust and fast with Blink. ...I wonder why IJulia notebooks are so flaky on my system. Is it just me? No one else seems to complain about the speed/robustness of IJulia notebooks (that I have noticed). Other interesting observationThe updates are extremely responsive when I only use the Gtk application for plotting (deactivate inline plotting). That means that there is still a fair amount of overhead in sending the .png plot image back to Blink (because the exact same routines are used to draw to a PNG canvas that are used to draw to a Gtk widget) ... Unless Cairo is significantly less efficient at drawing on a PNG canvas than a Gtk widget. |
I don't complain simply because I don't use them :) I think Blink is simply much better to deploy an app locally. Concerning the extra overhead in sending the png plot, I observed something similar trying to use Makie in an Interact setting. Some of it may be due to the fact that the plot is redrawn for every intermediate value of your slider (as the observable updates every time you move the slider, even without releasing). To mitigate this you can throttle the observable. I.e., if you are using Concerning delays due to drawing the png in Blink, I'm taking the liberty to ping @SimonDanisch as I think he has done some thinking on it to integrate Makie and WebIO. |
Drawing an image that got generated in Julia in a web browser will always be kind of slow compared to a setting where you share the memory space ;) |
Good point. It is also interesting to note that refresh operations have much more lag from IJulia notebooks than from Blink. That means, in theory, it should be possible to speed up IJulia's rendering. Though I think that I am hitting is something even more problematic in IJulia (before the PNG speed issue) if I get "Malformed HTTP message" messages from IJulia. Maybe the solution is to just throttle things for now as @piever suggests. I had considered it, but never actually implemented that solution. I did not know about the |
Using Julia 1.0.0 on Ubuntu 18.04...
Background
I ported over a simple, yet realistic (useful), graphical filter design tool that was working in Julia 0.6:
https://github.com/ma-laforge/InspectDR.jl/blob/master/notebook/2_interact.ipynb
You can see some snapshots of how the main "design" section looked in Julia 0.6 on my web page:
https://sites.google.com/site/malaforgeweb/design-assist
I am having trouble with the stability of the software - and I believe it is either due to Interact - or IJulia in general.
Every now and then, I can get both the inline plot & the Gtk plotting application (InspectDR) to show up properly and resond to the sliders, etc....
Problem
...but most often, Julia seems to hang - doing so silently, without eror messages (I don't even notice the "kernel died" message).
Usually, I don't even get a chance to touch the sliders. Things just hang when I try to display the widgets after the plot is shown.
I have sometimes seen the message "Invalid JSON in body of request." show up. I am not certain if that is relevant.
Question
I don't like opening an issue that is so vague, but
does anyone know why this might be happening - how I might fix this issue???
Comment
The sample notebook I have written might be a useful, realistic example for the Interact team to provide in the tutorials - in case it makes it a bit more desirable to solve a problem that is a bit less well defined.
The text was updated successfully, but these errors were encountered: