Buttons don't do anything different than scripts. In fact, they execute scripts (or just single script steps).
I'd say there's a difference in how the two script steps are configured.
possibly! can OP post the two (what the button is doing, over what the script is doing)?
Both instances did this same find from the same location. None of these fields are calculation fields and they all belong to the layout's table naturally.
The button does just this find. The script does more, but I positioned the debugger right before the find step and let it loose for the purpose of timing.
Does FM somehow prioritize button calls over script calls? is there a way to change this?
No it does not. No there is not.
As everyone says, there is no difference, especially as big as you suggested - 20 seconds vs 8 minutes plus. If it was a bug this forum would be full of posts on the topic.
What do you call a "button". Are you referring to a custom button object placed on a FileMaker layout or a FileMaker built-in search functionality which uses a "Find" button for running the search?
right, ignore my previous post, it is a button object.
Duplicate your script and remove all steps apart from Find. Run this script on the same layout as the buton.
My suspicion is, there is something else on the script which causes the delays. You might not see it in the debugger, may be the records are not committed at this stage