简体   繁体   English

是否可以使用Ruby Socket来提高ruby应用程序的性能

[英]Is it possible to improve the performance of ruby application using Ruby Socket

I have an application and i want to improve the performance of that application. 我有一个应用程序,我想提高该应用程序的性能。 For which i am trying to use Ruby Socket, so that whenever the data in the database changes respective page will get change automatically. 为此,我正在尝试使用Ruby Socket,以便每当数据库中的数据更改时,相应的页面都会自动更改。

I just want confirmation that this is possible or not and if it is possible some demo application which uses the Ruby Socket. 我只想确认是否可行,是否有可能使用Ruby Socket的演示应用程序。

If it is not possible using Ruby Socket, what are the other ways using which i can improve the loading time of the pages of my application. 如果无法使用Ruby Socket,可以通过哪些其他方式来改善应用程序页面的加载时间。

Of all the ways to improve application performance, using a Ruby socket seems like kind of a last ditch approach. 在提高应用程序性能的所有方法中,使用Ruby套接字似乎是最后一种方法。 Improving performance really depends on where the bottlenecks are, so I would start by figuring out exactly where you have issues. 实际上,提高性能取决于瓶颈在哪里,所以我首先要弄清楚问题出在哪里。 I'd recommend New Relic for this, and you can even use a free local dev mode version if it's not in your budget. 我为此建议使用New Relic ,如果您不在预算之内,甚至可以使用免费的本地开发人员模式版本 Is your database not responding fast enough? 您的数据库响应速度不够快吗? Is your Ruby code doing too much in a request? 您的Ruby代码在请求中做得太多吗? Does your server need more resources (memory, cpu, etc)? 您的服务器是否需要更多资源(内存,CPU等)? Once you figure out where you have performance problems, then you can target each issue directly. 一旦找出了性能问题所在,就可以直接针对每个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM