Skip to content
New issue

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

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

Already on GitHub? # to your account

Prototype Client and Devices Indexes #7821

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sanchezzzhak
Copy link
Collaborator

@sanchezzzhak sanchezzzhak commented Sep 11, 2024

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
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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants