Sorry, but it is not possible to compile a ruby script. What is this download / activity script?
You are right, 30 seconds are quite long. Does this script make calls on the Internet or in databases that are very expensive? It's hard to believe that libraries will take so long to load
... I just noticed the comments and saw that you got to 1-4 seconds ... this is very good, especially when you go down from 30. Other comments are correct, please place the required at the top of the script
source share