peek-rblineprof icon indicating copy to clipboard operation
peek-rblineprof copied to clipboard

Incorrect line profiling in views

Open feliperaul opened this issue 6 years ago • 0 comments

First of all, thanks for the effort in this gem.

Take a look at the following SS:

image

I'll try to describe what I think the incorrect behavior is (please look at the number on SS):

  • There's no ruby on (1) (doctype), (2) (meta viewport) and (3) (link rel manifest), so I don't get why there's profiling there
  • On (4), there's ruby but there's no profiling;
  • On (5) and (6), there's ruby but it's a comment, unlikely it's taking all that time;
  • On (7), it shows it took 186 ms to render the csrf_meta_tag, which is unlikely; it also shows it took 0 ms to render the previous line (the stylesheet include), which was the culprit (as I show below).

So, to test, I removed the csrf_tag, and it showed that huge time in the next line (not the previous one) ... If I keep removing them, you'll see that huge time assigned to a line that has no ruby on it:

image

I wondered if everything was just offset by one line but it's irregular, as you can check if you analyze line by line.

In controllers profilling this does not seem to happen.

feliperaul avatar Nov 30 '17 09:11 feliperaul