smartdevicelink / sdl_core

SmartDeviceLink In-Vehicle Software and Sample HMI
BSD 3-Clause "New" or "Revised" License
241 stars 244 forks source link

Open INI file less #3688

Closed iCollin closed 3 years ago

iCollin commented 3 years ago

Fixes https://github.com/smartdevicelink/sdl_core/issues/2850

This PR is ready for review.

Risk

This PR makes no API changes.

Testing Plan

Change INI value, run SDL core, ensure Core read new INI value Unit Tests and ATF tests

Summary

Refactor INI parsing to reduce the number of times the ini file is opened. This goal is achieved through an update to Profile::UpdateValues:

  1. INI file is opened
  2. all values from the file are read into a smart_object
  3. INI files is closed
  4. Member variables are assigned from values in smart_object

Changelog

Enhancements
CMake

Tasks Remaining:

CLA

iCollin commented 3 years ago

PR description is updated for the new approach