Topic: How to Speed up Ruby Script Performance
I have written ruby script that is used to generate data in daily basis then update it
into reporting table called sku_wise_summaries.
I am having 5000 records in outlets table and 30 records in Skus table.
I wrote a ruby script that calculate the data by using some complex calculation for each outlet and sku then finally update data into sku_wise_summaries table.
for outlet in outlets
for sku in skus
data=...... #do some complex calculation
I am running the above script on server with help of cron on daily basis.
It takes too much of time like more than 10 hrs.
I optimized the code as possible as i can and still i feel the performance is too bad.
If it takes too much of time , i have to face other kind of severe problems.
So i need to know the way of improving script speed/perfomance.
Could any one please give a good solution to improve the speed of my ruby script?.
Thanks in Advance