Input causing module to re-render

I have been using this workaround. While it does work, I'm noticing the query that is set to monitor an input will keep triggering constantly and quite randomly even though the input isn't changing. If I just move my mouse around the screen, the monitoring query will start firing randomly. I really am wondering why? And, I am starting to wonder it this may be affecting app performance in other areas. Meaning, what if I have a big transformer that is monitoring an input. Is the transformer also recalculating constantly while I am simply moving my mouse around the screen. I am not sure how I can even check when a transformer recalculates.

Hi @Shawn_Crocker,

Would you be willing to share a screenshot of the query? It shouldn't trigger based on moving your mouse :thinking: Automatic queries and transformers should trigger on inputs change & on page load

I have run across similar issues.

I believe that is because even reading the temp var passed into the module may cause it to react. Setting it to the same value will cause it to react. Then everything watching that variable will trigger.

1 Like

That's a good point, @bradlymathews. Even if a dynamic input isn't changing to a new value, if it is getting re-evaluated for some reason, it will cause re-triggers.

1 Like

@Tess my apologies for not responding. Not sure why I'm not noticing my community updates. I have noticed stability in some newer creations. I will post some screenshots of the module I am still seeing this behaviour in shortly.

@Tess Here is a gif of a current application with modules setup with dummy json/sql queries.

2023-09-24 21-16-36 (1)

You will see a module query trigger randomly as I simply move my mouse across things on screen. When I stop mousing over stuff, the query stops firing. My concern for this behavior is less for module performance but more for transformer performance. My concern is, are transformers also sometimes recalculating randomly based on this seemingly noise induced triggering? But, as stated, I am not seeing modules performing like this in new creations so...maybe just a legacy issue from a time when module outputs were also performing in a strange way?

Thanks! Very strange :thinking: I haven't been able to reproduce this :disappointed: I see one other report of similar behavior, but we still haven't been able to track down the cause of the issue. I've added your +1 to the ticket where we're tracking this issue. Can any of the transformers be converted to JS queries? Without seeing the code, I'm not sure that it would necessarily help to have queries instead of transformers, but JS queries have more control options.

If you expand the console logs, does it say the queries are triggered due to "user interaction" like this:

Our team is going to take a closer look at modules as a whole in the coming months, so hopefully we'll have some exciting module improvements early next year :crossed_fingers:

In the meantime, I might try duplicating or recreating some of the work to see if you can get the module into a better state. Wish I had a better solution for you! :slightly_frowning_face: I will post here if we're able to make progress on the underlying issue

@Shawn_Crocker I might have found something helpful :crossed_fingers: we have a report of a similar issue that was happening when the module had an output that was evaluating to {{null}} Could be worth checking if the inputs or outputs are null at any time

@Tess interesting. That strangely follows my comparison to the behaviour of a logic pin on a circuit board that hasn't been pulled to ground or supplied voltage and is just floating.

1 Like