I'm using PHP to pull financial data from yahoo. Then I'm sending the data in JSON format to one of my Typepad blogs and receiving it with JavaScript.
Is it faster to process the data on the server-side, then send the JSON subset to JavaScript. Or would it be better to send the whole thing, then process it with JavaScript on the client side?
How do I learn how to make this type of trade-off analysis on my own?
Mostly good estimating. Sending large amounts of data to the client for processing will incur client overhead and make their browsing experience less acceptable. Processing data server side will increase your server load per client.
This is a common situation seen with large tables of data that are sortable or paginated. You can either do that entirely in browser or enable server side sorting and paignation. My rule of thumb is if I have more then 10k cells (10 columns x 1000 rows) then I should probably enable server side processing instead of leaving it up to the client. This is especially true on older machines with shitty slow JavaScript engines.