51Degrees / device-detection-node

Device detection engines for Node.js implementation of the 51Degrees Pipeline API
Other
2 stars 4 forks source link

deprecate performance graph #159

Closed justadreamer closed 4 months ago

justadreamer commented 4 months ago

Background

Historically the data file contained 2 variants of the graph (a data structure used to match substrings in order to detect the device profile components): predictive and performance. The first is more comprehensive and slower, the second is less accurate and faster. The decision was made to deprecate performance graph and now the data file always contains only predictive graph - it is the default.

Objective

  1. DeviceDetectionOnPremise (and DeviceDetectionOnPremisePipelineBuilder) contains usePerformanceGraph and usePredictiveGraph flags - they have to be marked as deprecated in the code comments and we should output a warning whenever either of them is used telling: "{option_name} option is deprecated and has no effect on the configuration". If they can be removed from the parameter list (i.e. parameters are named and not positional - it would be ideal).
  2. The internal code has to be updated so they indeed have no effect on the engine configuration.
  3. We must remove them from the examples (at least performance-console I believe uses them) and verify that the examples actually work.