Console vs Button on Click using Mac App.
Technically .. what is the difference when running logic from the console vs running logic from the Button On Click event in the Mac App?
I have a global function that reads 7,000+ rows in order .. and then builds a summary table of a few dozen rows from the for loop.
When I call the global function from the console the for loop processes 7,000+ rows and builds a few dozen summary rows in about 4 seconds.
When I call the global function from within the Button On click... well.. it is still running after about 5+ minutes.
8 replies
-
Could it be that the script behind a button is executed locally and script via the console, on the server?
can you execute your code in the button forced to be executed on the server and check the difference?(do as server...)
-
@Steven
I thought the same... When I pull the code in locally to the button .. and wrap it in a do as server... NOTHING happens.. It is as if the script does not even execute. So.. I am off to build it step by step to see where the down fall is.. :(
-
Hmm.. So this code finishes.. There are 3500+ rows.. not 7,000..
If I add one more if / else... code runs .. and runs.. and I eventually kill it after 5+ minutes..
If I wrap it in a do as server... the do as server code block never executes.
-
The one additional if / then / else.. 32+ minutes via Mac App / button logic.
-
@Mconneen, What's the performance like if you run the process with the data stored on your local computer?
-
Here is the local (My Databases) performance of the code behind the button..
And if I run it from the console..
-
And this is the console time running from Mac App against ninox cloud database
-
Folks.. just an update.. So.. I have a "Dashboard" table.. that has "views" of other tables / data. Running logic against one of those base tables from the Dashboard table is where the slow down is. I changed my strategy to "openRecord" against the other base table.. and put a button on that table .. and POOF.. runs quick. :(
Content aside
- 4 yrs agoLast active
- 8Replies
- 1726Views