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

Skip recursive device parsing is UA client hints and the model name is empty #7823

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

sanchezzzhak
Copy link
Collaborator

@sanchezzzhak sanchezzzhak commented Sep 13, 2024

This improvement speeds up the work a little if the device model is not specified in clienthints, and the user agent is intentionally anonymized.

Full scan the list of regular expressions would be unnecessary.

@sanchezzzhak
Copy link
Collaborator Author

on average, 50-56% of requests have clienthints for the current month

hits cnt client-hints event_date hits cnt all android useragent
10139158 2024-09-01 17873316
9732557 2024-09-02 17150340
9793487 2024-09-03 17584173
10820424 2024-09-04 19916243
10772409 2024-09-05 18866216
9064432 2024-09-06 15331011
10615825 2024-09-07 17956470
11495161 2024-09-08 19033873
11698127 2024-09-09 20978778
10623247 2024-09-10 18983977
10063242 2024-09-11 16447821
9416115 2024-09-12 15594047
3826385 2024-09-13 6491840

@liviuconcioiu
Copy link
Collaborator

2331 user agents in 11722 ms
2331 user agents in 3158 ms

Almost 4x speed improvement for those user agents.

@sanchezzzhak sanchezzzhak merged commit c6930df into matomo-org:master Sep 13, 2024
15 checks passed
@sanchezzzhak sanchezzzhak deleted the pr_device_461 branch September 13, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants