Skip to content

Say that PHP's start-up engine always uses MaxPerformance, and that Update Matched User Agent is on by default - #307

Draft
jwrosewell wants to merge 1 commit into
rcfrom
docs/profile-and-matched-user-agent-defaults
Draft

jwrosewell wants to merge 1 commit into
rcfrom
docs/profile-and-matched-user-agent-defaults

Conversation

@jwrosewell

Copy link
Copy Markdown
Contributor

Four pages state a default or a rule that the specifications changed or made explicit this week. This pull request brings them in line.

Hold this until the package releases have shipped. Two of the statements it adds are true only once releases that are not out yet have shipped, as set out under Releases this waits for.

What the specification now says

At specifications 4da1891 on rc:

  1. The Device Detection on-premise performance profile defaults to Balanced, except for the engine PHP builds at start-up, which always uses MaxPerformance (Performance Profile row and PHP footnote).
  2. The IP Intelligence on-premise performance profile defaults to Balanced, with the same PHP exception (Performance Profile row and PHP footnote).
  3. Update Matched User Agent is on by default, and the UserAgents match metric is filled in only when it is on (UserAgents row and Update Matched User Agent row).

What changed on each page

Page Before After
Performance options The table marks Balanced as the default, with no exception. A paragraph under the table says that the engine PHP builds when it starts, from the php.ini file, always uses MaxPerformance, that any other profile set there is refused, and why.
Cloud to on-premise, step 6 Lists the profiles to choose from, with Balanced as the default. Adds that PHP's start-up engine always uses MaxPerformance, so there is no profile to choose in PHP, and links to the performance options page for the reason.
IP Intelligence algorithm "With the default Balanced profile", with no exception. A paragraph after the deployment options gives the PHP start-up exception and the reason, and says that an engine PHP code builds later from a settings array may use any profile and defaults to Balanced.
False positive control, match metadata The match metadata, UserAgents included, is returned "Regardless of the settings used". UserAgents is filled in only when Update Matched User Agent is on, which it is by default. The opening sentence now names the Difference and Drift settings, so the two sentences agree.

Releases this waits for

  • PHP's start-up IP Intelligence engine. In PHP 4.5.206, the latest release, that engine takes its profile from the php.ini file and defaults to Balanced (ipi-php.i line 68). 51degrees-php#40, merged into rc on 9 November, makes it always use MaxPerformance. The IP Intelligence page is right for PHP from the release that carries that change.
  • Update Matched User Agent. Node.js 4.5.102 and Python 4.5.102 turn it off by default (Node.js, Python). The Node.js rc branch leaves it to the C library unless it is set (deviceDetectionOnPremise.js lines 403 and 404). The Python change is 51degrees-python#57, which is still a draft and is not in the open Python release candidate, 51degrees-python#67.

The PHP Device Detection statements are true today. PHP 4.5.206 already builds the start-up Device Detection engine with MaxPerformance (hash-php.i lines 83 to 95) and refuses any other profile in the php.ini file (DeviceDetectionOnPremise.php lines 58 to 63).

The Balanced default these pages already state

The pages already said that Balanced is the default, and this pull request does not change that wording. It is wrong today in some languages and becomes right with the same releases.

Recommendation

Wait for the releases, as #303 does, rather than name versions on the pages. Naming versions would need one for each language and builder above, and the Python Device Detection change is not in any release candidate yet, so the version that will carry it cannot be known. Mark this ready once the C library release and the next Node.js, Python, Java and PHP releases have shipped, after checking that the Python release carries #57.

Searches run

All on rc at 8529cbe, case-insensitive, across the Markdown in src, the snippets in src/snippets, the pattern library sources and the Doxygen files in docs:

  • LowMemory, MaxPerformance, Balanced, PerformanceProfile, performance_profile, performance profile, and default within 40 characters of profile
  • UpdateMatchedUserAgent, update_matched_useragent, MatchedUserAgent, UserAgents, matched
  • 51dpipeline, endpoint, SetEndpoint, JavaScriptBuilder, callback url
  • ObjectName, objName, object-name, object_name, fod-js, fod as a word
  • MissingTranslationBehaviour, MissingTranslationBehavior, sourceDataKey, SourceElementDataKey, translat, behavior, behaviour
  • php.ini, ini_set, FiftyOneDegreesHashEngine, FiftyOneDegreesIp
  • memory

Hits left alone

  • Concurrent processing, lines 113 to 118. The PHP snippet sets performance_profile=LowMemory in the php.ini file, which PHP 4.5.206 already refuses. Say what Concurrency does on the concurrent processing page #303 replaces that snippet, so this pull request leaves the page alone.
  • Upgrading to V4, lines 287, 295, 330, 441, 450, 586, 594, 696, 704, 731, 827, 837, 854, 871, 936 and 943. Each sets a profile in a migration example or recommends one, and none states a default.
  • Cloud to on-premise, lines 98, 127, 164, 223 and 228. Explicit settings and recommendations.
  • Hardware benchmarks, line 150. "Balanced, the default profile" describes the C library runs, and Balanced is the C library's default.
  • Automatic data file updates, lines 135 to 137. A recommendation.
  • Varnish, line 41. The Varnish module's own DEFAULTS value.
  • Required UA-CH headers, line 47. Names the maximum matched User-Agent length setting in each language, which is a different setting.
  • PMP configuration line 22, PMP integration line 28 and client-side evidence line 195 give fod as the default object name, which has not changed.
  • No page gives the Go JavaScript builder's default endpoint, the object names the JavaScript builder refuses, the callback URL checks, the Translation Engine option names or the php.ini spellings of on and off, so nothing needed changing for those.

The performance options page, the cloud to on-premise guide and the IP
Intelligence algorithm page now say that the engine PHP builds when it
starts, from the php.ini file, always uses MaxPerformance, and why. The
IP Intelligence page also says that an engine PHP code builds later from
a settings array defaults to Balanced.

The match metadata section now says that UserAgents is filled in only
when Update Matched User Agent is on, which it is by default.
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Documentation preview 👀

This branch has not been deployed

No deployments
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.

1 participant