Did anyone use light client (smoldot) with substrate-connect js library for connecting to multiple chains? Or have any experience with it? Let me describe the problem. In the Nova Spektr application we're using substrate-connect for the light client support. However the desktop application may keep only 3 light client instances running at the same time and the laptop starts consume the RAM (more than 4GB).
First things first, I am not sure what you mean by "light client instances" in your message. Do you instantiate multiple light client or you mean Multiple chains added to one instance of a smoldot light client?
It seems to me that something is tricky on your case since in the browser (using Substrate-connect demo) the maximum RAM usage is approx 80 MB):
The correct approach (and one that substrate connect) is using, is instantiate one client and add/remove chains on that 1 instance;
Substrate Connect could be more "heavy" than Smoldot since PolkadotJS API is used, which does not fully (and probably will never) use the new JSON RPSEE API, but it provides access to PolkadotJS API while smoldot-js does not.
In any case 4GB usage of RAM, make me assume that there is something wrong with the way that Substrate Connect is used, and gives a suspision of leaky code;