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 trialDipika Purohit
Courses Plus Student 20,955 PointsDo 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
1 Answer
Ari Misha
19,323 PointsHiya 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
Dipika Purohit
Courses Plus Student 20,955 PointsThank you Ari misha :)
Steve Gallant
14,943 PointsSteve Gallant
14,943 PointsTo clarify, are you referring to developer comments you type into the code, or comments left on the website by visitors, etc?