Do html forms Use much cpu power?

I'm going to have a page on my website that will have about 50 forms on it. Stacked in accordion CSS. Would this hurt users with slower computers?

Upvotes: 5

Views: 262

Answers (3)

Pranav 웃
Pranav 웃

Reputation: 8477

Even though I do not know why you would want 50 forms on a page, having 50 forms (assuming an average number of DOM nodes), will consume insignificant amount of CPU, when the page is rendered.

If however, in aggregation your forms have like a million DOM nodes, you'll be able to see a good amount of CPU consumption while the page is rendering. More importantly, what you do with on the page using JavaScript, will addon more consumption.

In most cases, you should be more concerned about memory usage. Also if you care about details, make sure that you follow valid HTML, use CSS selectors efficiently, etc.
To optimize rendering, this is a list of good practices.

Also in case you're using a lot of CSS-transitions, it will consume a significant amount of CPU.

The best way to judge is, however, to test it yourself. If you're using the Chrome browser, make sure to keep an eye on the Chrome Task Manager (Shift + Esc), and follow the CPU consumption when you reload the page, or do activities on the page. It also gives you the process id, incase you want to invesigate further.

Upvotes: 6

donlaur
donlaur

Reputation: 1287

I don't think it would hurt people with slower computers. Other thing to consider though is that people with slower computers usually have older computers and could have small screen resolution, something that seems odd in today's day and age but maybe have javascript disabled (you mentioned accordion which might have jquery or javascript involved with it).

Or worse, older browsers like IE6.

Not sure how it could "hurt them", but I would try to use as clean and compact code as possible to make sure that the download time on the file isn't too great. Code can be minimized and optimized to run faster. Try to run in as few as scripts or includes as possible, to reduce extra connections and download. Keep images smaller and clean and use CSS image sprites if you have rollover effects or simply just color based CSS rollovers.

Your CPU power will be used on the server side which should be able to output HTML without causing issues.

Upvotes: 2

Damien Overeem
Damien Overeem

Reputation: 4529

50 forms on one page will not increase your CPU. It will however increase the size of your html file and thus increase the download size.

They will also require a bit of memory, but considering todays average specifications of the average web-enabled pc, you have nothing to worry about client-wise.

Upvotes: 3

Related Questions