# DeviceAtlas Device Detection API Config # There are multiple factors which might affect API behaviour and performance. That includes PCRE version or DaConfig class attributes. * Recommendations * DaConfig class attributes #### Recommendations #### ** PCRE ** Usage of the PCRE library above 8.20 version is highly beneficial and recommended, it brings the PCRE Study and Just in Time compiler support. The performance difference between using 8.20 version (or above) can be up to 300 %. ** pthread ** Compiling the API in an environment which supports pthread. ** Multithreading ** The Device Atlas C++ API is multi thread safe. If a compiler supports multithreading (e.g. OpenMP library) it is possible to set a thread to a specific cpuset. This is thanks to usage of pthread primitives. #### DaConfig class attributes #### DeviceAtlas C++ devatlas DaConfig class provides options to customize some of the API behaviour. * Include User-Agent properties * Include language properties * Include _matched/_unmatched properties ##### Include User-Agent properties ##### Boolean value to enable/disable the addition of User-Agent properties to the detection. They are also known as "dynamic" properties as they can be detected on the fly by directly parsing the User-Agent. Enabling this property will worsen API detection performance. If you don't need these properties, then set it to false. User-Agent/Dynamic properties: browserName, browserVersion, browserRenderingEngine, osName, osVersion **DaConfig member** ``` DaConfig dcfg; dcfg.include_ua_props = false/true; setConfig(dcfg); ``` **Default value** true ##### Include language properties ##### Boolean value to enable/disable the addition of client's language and locale preferences to the device property set. If you don't need these properties, then set it to false. Language properties: language, languageLocale **DaConfig member** ``` DaConfig dcfg; dcfg.include_lang_props = false/true; setConfig(dcfg); ``` **Default value** true ##### Include User-Agent matched properties ##### Boolean value to enable/disable the addition of the matched properties. If you don't need these properties, then set it to false. Language properties: _matched, _unmatched **DaConfig member** ``` DaConfig dcfg; dcfg.include_matched_props = false/true; setConfig(dcfg); ``` **Default value** false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _ Copyright (c) DeviceAtlas Limited 2021. All Rights Reserved. _ <!-- HTML+JS for document formatting when opened in browser --> <div class="btn-group" id="main-menu" style="float:right"><a class="btn dropdown-toggle" data-toggle="dropdown" href="#">Menu<span class="caret"></span></a><ul class="dropdown-menu"><li><a href="README.html">Main</a></li><li class="divider"></li><li><a href="README.DeviceApi.html">Device Detection API</a></li><li><a href="README.DeviceApi-Web.html">Device Detection for Web</a></li><li class="disabled"><a href="README.DeviceApi-Config.html">Device Detection API Config</a></li><li><a href="README.CarrierApi.html">Carrier Identification API</a></li><li class="divider"></li><li><a href="README.Windows.html">C++ API and Windows</a></li><li class="divider"></li><li><a href="https://docs.deviceatlas.com/apis/clientside/latest/README.ClientSide.html" target="_blank">Client-side Component</a></li><li><a href="README.Apache2.html">Apache2 Module Installation</a></li><li class="divider"></li><li><a href="README.ConnectivityAnalyser-Apache2.html">Apache 2 Connectivity Analyser</a></li><li class="divider"></li><li><a href="README.IIS.html">HTTP Module / ISAPI Filter 2.1 Installation</a></li><li><a href="ApiDocs/index.html">DeviceAtlas ApiDocs</a></li></ul></div>