1. Get a fast machine with plenty of ram and an SSD disk. Sounds obvious but it is amazing how a project can snap to life with relatively up to date hardware. Often testers don't have good machines because they are transitioning from a manual testing and haven't been performing processor / memory / IO intensive tasks. If you build gradually massive TC projects over time the slowdown in the work flow can be like boiling a frog until one day you realise your spending half your time waiting on syntax checkers or projects to load.
2. I have seen this in JScript projects but it may apply to some other scripting languages: Be on the look out for variable assignments in the global namespace. i.e. in the script not inside a function:
// anywhere in any script not inside a function
var testData = readMassiveSpreadsheet();
readMassiveSpreadsheet will be invoked every time you run anything and TC will block until it is finished.
3. I've noticed that a syntax check time seems to be related to project size so keep the size of each project reasonable even if that means more projects in one suite. Loading a massive project suite can chew up memory but it does not seem to affect the syntax check time like having massive projects.
4. If you are using name mapping files and they are getting massive periodically remove property info from the xml file this massively reduces the file size and memory footprint of (haven't done this for ages as I stopped using name mapping files years ago but there will be a how to somewhere in help or on the forum). Doing this can reduce both the memory footprint and load time of a project suite a lot.
5. Create simple understandable standards for modularising your scripts and and stick to them so it is easy to find and reuse functions. Here's what I use:
i) Test cases are in their own file and named with a namespace like style and end in the word test eg. ACME_Florist_Management_Payroll_Test,
ACME_Florist_Management_POS_Test,
ACME_PowerStationControl_Temparature_Test
test cases are not allowed to be referenced by any other file
ii) Helpers - script units named after the domain are application specific and can be used by Test cases and other helpers. Usually only used within a single project. e.g TemperatureControl, Payroll.
iii) Utils - Very Generic functions can be used by other Utils , Helpers or Test cases. Named after their function with the word Utils on the end; StringUtils, DateTimeUtils. Utils are not allowed to reference helpers or test cases. They can be shared between projects and project suites.
6. Use a duplication detection tool like Simian to keep your codebase DRY (I am sure there would be open source offerings available as well but this is the one I have used). Name and shame the offenders if they do not respond to counselling.