Gaps in FireBug waterfall chart

Deadly 提交于 2019-11-30 08:05:08

The main reason this happens is for files that are loaded by scripts and CSS files.

  • For example: CSS, background images won't start loading until a small delay after the CSS file that links to them loads.

  • Many JS libraries also load images, CSS, and/or other files. These loads won't start until the calling JS is loaded, plus a small processing delay.

  • Libraries, or inline JS, may also fire off loads at the DOMContentLoaded event (the purple line) or the load event (red line).

  • Finally, obviously, JS can execute AJAX that fires after any manner of delays/intervals.

Jan Odvarko who worked on Firebug explains it himself here:

http://www.softwareishard.com/blog/firebug/firebug-net-panel-timings/

He mentions the gaps in comment #18:

"These gaps represent a time when no requests happened, this can be e.g. due to a javascript execution on the page, which blocks page download or page rendering, CSS resolving, etc."

The most obvious reason I can think of (other than a bug in Firebug) is that you've got the filter switched to only show a subset of requests. For example, you may only be showing Javascript files, etc.

Your screenshot doesn't include the filters or the filenames, so I can't tell that for sure, but that seems like the most obvious answer.

Immediately above the panel in your screenshot is a block of filters. Make sure you've got the "All" option selected. If you have anything else selected, then gaps are to be expected.

The other reason would be if you have some page elements being fetched separately from the initial load, eg via Ajax or deferred loading. These may be loaded very soon after the page has loaded, but not immediately, leading to gaps in your timeline.

Hope that helps.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!