Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improvements in network configuration storing procedure #1389

Merged
merged 3 commits into from
Jul 2, 2019
Merged

Improvements in network configuration storing procedure #1389

merged 3 commits into from
Jul 2, 2019

Conversation

MateuszKlatecki
Copy link
Member

@MateuszKlatecki MateuszKlatecki commented Jun 28, 2019

Description

Added check whether something changed in the network configuration and only in this case, write to Flash memory

Motivation and Context

  • Removal of unnecessary write operations to Flash memory

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: GITHUB_USER <GITHUB_USER_EMAIL>

…flags are set in the updateFlags variable, there is no need to save the configuration block.

(cherry picked from commit ad99a0a5cf4b038b7fe1cd42ee308115f0c0d00e)
@nfbot
Copy link
Member

nfbot commented Jun 28, 2019

Hi @MateuszKlatecki,

I'm nanoFramework bot.
Thank you for your contribution!

A human will be reviewing it shortly. 😉

@josesimoes josesimoes added Series: NXP i6 Everything related specifically with NXP targets Area: Common libs Everything related with common libraries Type: enhancement and removed Series: NXP i6 Everything related specifically with NXP targets labels Jun 29, 2019
@josesimoes
Copy link
Member

Nice improvement!

Can we improve this a bit further?
If, besides these, we compare the new settings with the existing ones and they are the same, there is no need to go through the update as there is nothing to actually update, right?!

As it is, on targets with flash storage, it's burning the config sector over and over needlessly.

@MateuszKlatecki
Copy link
Member Author

You are right, we can go further and check whether any change has occurred and then save the configuration. I will try to code it.

(cherry picked from commit c2b927143964ad5a5cc31768b07147d241e291f6)
(cherry picked from commit 193acb6178c6a7608fbbef6cb99409cf303fdbb1)
Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it's much better and efficient! 👏

@josesimoes josesimoes changed the title Improve in UpdateConfiguration method Improvements in network configuration storing procedure Jul 2, 2019
@josesimoes josesimoes merged commit d25554e into nanoframework:develop Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Common libs Everything related with common libraries Type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants