Generic Javascript View

Hi,

what needs to be done to add a dependency to the dependencies list in an generic JavaScript View node?
I do not want to add code by flow variable because it then needs to be loaded by every View node. A dependency I expect to load only once even if multiple views referencing the same dependency in the same board.

thanks

Hey @wsturmzfknime,

you would need to have an eclipse setup and change the native code of the node. It is currently not easily possible to extend the list of libraries the node can use. We already have some plans to improve this whole system as soon as we migrate this node into the new ui (no timeline yet).

But I am also not entirely sure if that would solve your problem. As far as I got it you want to reduce the amount of times that the libraries are loaded? What exactly are you trying to reduce? There are two different types of loading happening.

  1. The Library code needs to be send to the client
  2. The received library needs to be interpreted by the browser

Even if you now include the library code into the native node, it would still needed to be send and interpreted to the client in a Hub/Sever context. If you are in a local AP setup this would improve things, but you could also download the library only once with a “Get”-Node and insert it into multiple Generic JS Views to have the loading only once.

If you can give me a bit more details on the underlying problem you are trying to solve, there are maybe already optimisations that you can do now :slight_smile:

Greetings,
Daniel

2 Likes

Thanks for the insights @DanielBog.
as long it runs in Desktop environment I am fine. But I need to be able make the workflow usable on different desktops.
I have two use cases:
1.) using a different version of plotly.js than bundled with Knime 4.7.8 as the version 1.4y does not support grouping text of legends, current version is around 2.3x
2.) include my own library to bundle larger code blocks

thanks