Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance metrics report incorrect DOM Processing & Completion times #17646

Open
MaghSamana opened this issue Jun 4, 2021 · 9 comments
Open
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@MaghSamana
Copy link

Hello,

I was getting strange metrics sometimes, and today I was able to locate the problem in real-time. My site offers PDF documents for download in a section. I had noticed high DOM times (both processing & completion) when visitors downloaded some of those, in the past.

Today, I had one visitor spending almost 2 hours there, browsing that section. The visitor downloaded several PDFs and also printed some articles of that section (not PDF prints, just regular content). I saw the DOM metrics rise very high, reaching almost 40 seconds, and only due to that one visit. The visitor used Chrome 91.0 and Windows 10.

These particular pages load fast, and mostly contain text. In general, this problem of high DOM metrics appears to be associated with visitors who also download. I do not know why, but I happened to witness it today in real-time with only 1 visit.

Image:
Visitor info and summary & the metrics of the last days where there was an increase in visitors who downloaded PDFs. The last bar is from today, and is only from one visit - I saw the bar increase from 3.5s to almost 30s and then to 40s.

Untitled-1

Our Environment

Matomo version: 4.3.1
PHP version: 7.4.19
Server Operating System: Apache

@MaghSamana MaghSamana added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Jun 4, 2021
@diosmosis
Copy link
Member

Hi @MaghSamana, if you were to perform the same actions as this user, would you see the same performance metrics show up in Matomo (in other words, is the problem reliably reproducible)? Can you see what browser, os, internet provider the specific user is using?

@MaghSamana
Copy link
Author

The visitor used Chrome 91.0 and Windows 10 (and 1366x768). I haven't added internet provider tracking.

I will try to reproduce this tonight, and get back to you.

@MaghSamana
Copy link
Author

MaghSamana commented Jun 9, 2021

After various tests, and with various browsers, the problem of extremely high DOM is certainly tied to Chrome browser v. 91.0.

Both in my tests, and in the visits with excessive DOM (from 20 secs, reaching as high as 80secs the more downloads there are), it was always this particular browser version.

Browsers like Safari, Edge, do not reproduce this. I got partial reproduction with Firefox 89 - high DOM but not as much (10-12secs at most).

@diosmosis
Copy link
Member

Hi @MaghSamana, thanks for testing this! Would you be able to reproduce this and collect the network requests made to your matomo.php instance, then share them here? Or if you're comfortable sharing the website this is happening on, we can take a closer look (email me at dizzy@innocraft.com if so).

@MaghSamana
Copy link
Author

I keep seeing these bizarre metrics again and again. Anyway, I sent you an email, and let's see what could be the issue here.

@diosmosis diosmosis added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Jul 14, 2021
@diosmosis
Copy link
Member

Based on communication w/ @MaghSamana, this is definitely some kind of bug, though I'm still not sure what the cause is. I'll keep looking.

@diosmosis
Copy link
Member

Finding the cause of the issue is proving to be rather difficult. It seems to be due to a single visitor that downloads PDF documents.

The quickest way to solve this would be to add segments for page performance dimensions. This would allow users to ignore values that are greater than a threshold, or find visits with abnormal values to figure out why they are like that. As it is now, it's extremely difficult to find this information, having to query the log tables directly.

@tsteur
Copy link
Member

tsteur commented Jul 28, 2021

👍 We'll look further into it once the issue is scheduled. We'll probably wait first to see if other users are having a similar issue. Possible it's an issue with that Chrome version. For the segments we have an issue here: #10202

And also created #17824

@rr-it
Copy link
Contributor

rr-it commented Jul 11, 2023

Another case for high DOM processing is:
Visitor opens multiple/all links on page in different tabs at once.

The browser processes like 20 page loads at once and the time for DOM processing really gets up. After the pages are loaded, the pages report their performance data to Matomo e.g.:

  • 1 visit
  • Total time on site: 50 seconds
  • Page impressions total: 20
  • DOM processing of each page: ~ 30 seconds

In this case we might try to somehow recognize this behaviour – and then flag this performance values or ignore them:

  • When a page is loaded in a 'not actual visible' tab:
    Recognize via javascript?
  • When multiple pages are loaded at the same time:
    Recognize server-side on report generation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

4 participants