It's always a good idea to do as much work in the script as possible because the work only needs to be done once when the document is reloaded, not every time the user chooses a particular sheet or object.
Consider this requirement: products with prices between £10.00 and £19.99 need to be shown in a straight table with no other products visible. It would be easy enough to do this as an
IF() statement in an expression:
We suppress zero values and hide the column. However, if there are several thousand rows, screen performance could be poor.
It would be better to do the work in the script if we can:
Product: LOAD ...