Current time: 12-16-2017, 07:37 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
many ad slots spiking cpu, multiplies render delays.
09-10-2015, 11:34 PM
Post: #1
many ad slots spiking cpu, multiplies render delays.
I have a website Im' working on for a client which has 8 advertising slots which are JS. The code for each slot resides within a dedicated iframe inline throughout a page.

There are two issues I'm trying to resolve:
1) The cpu spikes near 100% on webpagetest graphs.
2) With 1 ad it generally takes 1 sec for the ad to show. With 8 ads it generally takes 8 or more secs for the 1st one to show.

Getting ads to show up as quickly as possible is the aim. I suspect they're all trying to run at the same time hence the cpu spike & delay.

Thoughts?
Find all posts by this user
Quote this message in a reply
09-11-2015, 12:38 AM
Post: #2
RE: many ad slots spiking cpu, multiplies render delays.
(09-10-2015 11:34 PM)comforteagle Wrote:  I have a website Im' working on for a client which has 8 advertising slots which are JS. The code for each slot resides within a dedicated iframe inline throughout a page.

There are two issues I'm trying to resolve:
1) The cpu spikes near 100% on webpagetest graphs.

You could run the tests on the "Dulles Thinkpad" location which uses dedicated machines that are fairly high-end though that's just showing how much CPU would be consumed on high-end hardware.

If you test with Chrome and enable the "capture timeline" setting in the advanced settings you can get a dev tools timeline of the activity and see exactly what the slow parts of the js are that is causing the CPU to spike.

Quote:2) With 1 ad it generally takes 1 sec for the ad to show. With 8 ads it generally takes 8 or more secs for the 1st one to show.

Getting ads to show up as quickly as possible is the aim. I suspect they're all trying to run at the same time hence the cpu spike & delay.

Thoughts?

Quite possibly - there could also be resource contention in the fetching of the content for all 8 ads. Are all of them visible above the fold? If not then one quick fix would be to delay load the lower ads after the visible ones finish loading (onload handler on the frames should work well for detecting when each finishes loading).

I assume they don't have much/any control over the content of the ads themselves Sad
Visit this user's website Find all posts by this user
Quote this message in a reply
09-11-2015, 02:17 AM
Post: #3
RE: many ad slots spiking cpu, multiplies render delays.
(09-11-2015 12:38 AM)pmeenan Wrote:  
(09-10-2015 11:34 PM)comforteagle Wrote:  I have a website Im' working on for a client which has 8 advertising slots which are JS. The code for each slot resides within a dedicated iframe inline throughout a page.

There are two issues I'm trying to resolve:
1) The cpu spikes near 100% on webpagetest graphs.

If you test with Chrome and enable the "capture timeline" setting in the advanced settings you can get a dev tools timeline of the activity and see exactly what the slow parts of the js are that is causing the CPU to spike.
50% is 'Scripting', 25% is not accounted for (not even listed as 'Other').
Find all posts by this user
Quote this message in a reply
09-11-2015, 02:33 AM
Post: #4
RE: many ad slots spiking cpu, multiplies render delays.
On the left of the waterfall thumbnail there is a link to download the actual timeline or to view it in the browser (may only work if you are using chrome). There you can see the actual function calls and durations.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)