-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Make FIND sidebar more durable #1363
Conversation
I searched Chromium issues but I couldn't find a corresponding ticket. Maybe I don't have good searching skills. I'll see if I can create a minimal html file that would reproduce the problem. It it goes well, I'll create an issue at https://issues.chromium.org
The first commit (b2d5154) does it. But more recent commit (937341f) that uses
It looks like using external .svg files can be avoided with
Another idea I can think of is replacing template img tag's src text (color part) with JavaScript after checking current color-scheme.
I still haven't automated testing this. I simply run the app with VS Code (Electron View) and check how it performs using a pair of hands and eyes. I've used efficientdet-d3.onnx file to check FIND sidebar opening speed. On my machine it originally took about 4.5 sec to do so. To check stability of the program (#1358), I also use efficientdet-d3.onnx file. After opening the file, I type
List Virtualization would be a lot faster since it uses far less elements. It would also solve the problem reported in #1358. Since the number of items can be quite high with some models, I'd say it is imperative that Netron deploys List Virtualization. |
Its colors are adjusted using CSS filter. https://codepen.io/sosuke/pen/Pjoqqp
Can you validate the change at TIP which uses
Yes, right course of action seems to help getting the root issue in Chrome investigated. We could then pivot #1358 to "Find sidebar virtualization" if that's a more promising long-term solution. |
I've just checked the latest commit (f4d88dc). I can still reproduce the problem reported in #1358 by quickly opening/closing the FIND sidebar (with efficientdet-d3.onnx file). But I think in normal usage, this doesn't reproduce when users operate at a moderate speed. So I'd like to think this is not an urgent issue. As for the opening speed of the sidebar. It is probally the same. Inlining svg content is actually faster than
Surely the |
This PR tackles the problem reported in #1358.
FIND sidebar gets faster and a lot tougher now.
It seems like
<use>
tags spend more memory compared to simply cloning<svg>
nodes. So I guess they should be less often utilized for now.I've switched to
<img>
tags to display the svg icons as it's much faster than using<svg>
tags. Sincefill
andstroke
properties of svg elements displayed by<img>
tags cannot be controlled from outside, CSS filter is used to adjust icon colors.I also updated the program so that Find sidebar doesn't reopen when it's already opened. This change also makes the sidebar less vulnerable to the problem.