Are there any techniques on identifying the performance bottleneck of a script? I have a solution where it has been moved to server and now there is a performance delay that is noticeable to the end user. I would like to try and identify which sections of the script is causing that noticeable delay without blindly rewriting multiple sections. The only way I think of is to add startTimeX endTimeX variables at each "section" of the script and go from there. I suspect it is a small loop (max 15 times) where test replicates are created in a child table and maybe the excessive layout switching (triggers turned off) causing the problem.
Layout based on run, where user selects samples with "N" replicates. Script creates record in sampleJoin then creates the appropriate number of replicates in the grandchild table
run---<sampleJoin ----< ReplicateReactionResults
Also, side note. I am thinking of changing the loop section (creating replicates in the replicate table) to a PSOS. I never wrote a PSOS script and any feedback or generalize considerations would be appreciated.