I have an API based Application, no database. When I run it on my dev server is it 3 times faster than when I move it to production. Both environments are windows running 16GB of memory. The production server (Google Cloud Platform 4 CPU build 2.3Ghz) and the dev is a physical box (2 CPU 3.2 GHz) both running Intel Xeon.
Could the difference in CPU speed make the code in production run an average of 2.5s while the code in dev is averaging 600ms for the same call? All of the Lucee admin settings are also the same.
Is there a way to improve the speed in the production environment?
The FusionReactor profiler feature springs to mind as a way to identify what parts of your code are slower on production. But I would start by making your Java and Lucee versions the same across the board so you are comparing apples to apples.
I have updated the JRE and there is noticeable improvement. Process run on prod from local postman 2.42s, 2.17s, 2.94s from The same process run from dev 836ms, 417ms, 472ms
Interesting topic,most of the time the application may be slow if we are not writing code properly and we are not using the plugins correctly.From coding perspective everything is same ,there is a chance for having difference in the application server.
It is always better to use some logs to identify if some thing is not going correctly.Apart from that in local system we may have a different network than the network we are using for Production Server.We may also use load balancer in Production Environment.Production environment should be always faster for the users.
If you’re using something like postman to test CFML, you aren’t only testing the app server. You’re testing your connection to the server and all of the hops in between.