Commit graph

4 commits

Author SHA1 Message Date
Sean McGivern
96904b0236 Ignore API requests in performance bar
These don't have performance data saved as they use Grape.
2018-08-29 12:01:17 +01:00
Sean McGivern
8e1a8deee3 Lazy-load performance bar UI
We need to eagerly load the performance bar wrapper component
(`performance_bar/index.js`) when the page is loaded and the container element
is present, to ensure that we register the interceptor early enough in the
page's lifecycle.

However, we don't need to load the UI at that point. Not doing so means that we
can let Webpack extract the UI (`performance_bar/components/*`) into its own
chunk, so users who don't see the performance bar don't have to load too much
unnecessary JavaScript.
2018-07-13 11:25:40 +01:00
Phil Hughes
4d1bae708d
fixed karma 2018-03-21 17:26:07 +00:00
Sean McGivern
a200619d14 Show Ajax requests in performance bar
But first, rewrite the performance bar in Vue:

1. Remove the peek-host gem and replace it with existing code. This also allows
   us to include the host in the JSON response, rather than in the page HTML.
2. Leave the line profiler parts as here-be-dragons: nicer would be a separate
   endpoint for these, so we could use them on Ajax requests too.
3. The performance bar is too fiddly to rewrite right now, so apply the same
   logic to that.

Then, add features! All requests made through Axios are able to be tracked. To
keep a lid on memory usage, only the first two requests for a given URL are
tracked, though. Each request that's tracked has the same data as the initial
page load, with the exception of the performance bar and the line profiler, as
explained above.
2018-03-19 19:06:09 +00:00