Skip to content

Prototype Client and Devices Indexes - #7821

Open
sanchezzzhak wants to merge 6 commits into
matomo-org:masterfrom
sanchezzzhak:pr_device_460_index_prototype
Open

Prototype Client and Devices Indexes#7821
sanchezzzhak wants to merge 6 commits into
matomo-org:masterfrom
sanchezzzhak:pr_device_460_index_prototype

Conversation

@sanchezzzhak

@sanchezzzhak sanchezzzhak commented Sep 11, 2024

Copy link
Copy Markdown
Collaborator

Description:

This enhancement adds indexing to clients and devices.

  • php misc/generateIndexClient.php generate client indexes
  • php misc/generateIndexDevice.php generate device indexes

use indexes for DeviceDetector

$dd = new DeviceDetector();
$dd->clientIndexes  = true;
$dd->deviceIndexes = true;
$dd->setUserAgent(' .... ');
$dd->setClientHints($clientHints);
$dd->parse();
  • Does it speed up the process?
  • Yes
  • Is it effective ?
  • Yes

Minuses:

  • Long initialization -5sec for first call
  • we to generate indexes every time, with every PR

this can only be useful for background processing or runtime service

Result:
image

32k test passed for 42sec+5sec init is use indexes

Review

@liviuconcioiu

Copy link
Copy Markdown
Collaborator

generate indexes every time, with every PR

It will be much better if it can be automated in some way, like README.

@sanchezzzhak sanchezzzhak changed the title Added Client and Devices Indexes Prototype Client and Devices Indexes Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants