开发者

This framework cannot be suitable for large scale project? [closed]

开发者 https://www.devze.com 2023-01-13 16:39 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 1 year ago.

开发者_StackOverflow社区 Improve this question

I have developed a project using Symfony that on average takes circa 500ms to load one page on my laptop locally. I am worried. This laptop is at the minute only serving me, but what happens when this becomes a large scale project same size as facebook and mySpace?

Surely, Symfony cannot be suitable for a large scale project like youTube for a number of reasons?

Thank you for your time.

Marius


Any framework you are using will have a penalty which you pay for the abstraction. Same thing happens when using an ORM, you benefit from the abstraction but you pay the cost of the overhead for the ORM to give you what it gives you.

In your situation, as my professor always told me: "Get your application to work and then worry about performance." Now this is not to say during development you should not be aware of performance penalties and algorithm efficiency but it is to say that this comes second to achieving your desired result and then you can go back through profile your code and find the places which cost the most and work on those.


First of all, your laptop is doing both sides of the work here - both as client and server. While this shouldn't be noticeable on most machines, specifically a laptop may see bottlenecks in disk access (laptops usually have slower hard disks -> lower power consumption).

Second, and more importantly, you're probably looking at the site in development mode. Many frameworks, including Symfony, have modes like "devel[opment]" and "prod[uction]". Devel has extra logging, rebuilding autogenerated classes automatically, etc., while prod has a lower amount of logging, caching is enabled, and classes are only regenerated on operator's request.

Especially due to the second point, the framework will be slower in devel mode; try switching to production mode, and the difference should be apparent.

0

精彩评论

暂无评论...
验证码 换一张
取 消