Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Introduction to Front End Performance Optimization Optimize Assets HTTP Requests

Do comments increase page weight

I want to know the comments I write on my pages like html,css or javascript increase page weight on my webapp or websites,does that effect webpage performane

Steve Gallant
Steve Gallant
14,943 Points

To clarify, are you referring to developer comments you type into the code, or comments left on the website by visitors, etc?

1 Answer

Ari Misha
Ari Misha
19,323 Points

Hiya there! Your comments and the user who commented on same post, and every info relative to user, gets stored in the database behind the scenes. Now in the real world web apps, a system has like multiple databases. They even have multiple back-end structures in different Frameworks. Sites like AirBnB, Youtube etc., have adapted their back-end architecture with multiple frameworks serving the same needs: Request-Response cycle.

Now everytime a user posts a comment, your back-end architecture generates a HTTP POST method and send it to the controller(C in MVC), which Controller routes it to database and either updates the existing data or creates new rows in multiples databases at the same time and then serves you the success confirmation on screen for the user. This is one Request-Response cycle. More the requests , more workload your server has to perform, right? Thats something defo you need to plan ahead of time so that your app or server wont break. And every comment does increase workload on your servers as well databases behind the scenes , and it affects the performance of your application.

~ Ari

Thank you Ari misha :)