Skip to content

Make updateConfig rebuild the engine only when new config is different from the old one - #1256

Merged
sequba merged 9 commits into
developfrom
feature/issue-1251
May 18, 2023
Merged

sequba merged 9 commits into
developfrom
feature/issue-1251

Conversation

@sequba

@sequba sequba commented Apr 27, 2023 •

Copy link
Copy Markdown
Contributor

Context

I added a check in updateConfig method. If the provided config changes nothing in the engine configuration, the engine is not rebuilt.

How did you test your changes?

  • unit tests passed
  • new unit tests that verify the new feature

Types of changes

  • Breaking change (a fix or a feature because of which an existing functionality doesn't work as expected anymore)
  • New feature or improvement (a non-breaking change that adds functionality)
  • Bug fix (a non-breaking change that fixes an issue)
  • Additional language file, or a change to an existing language file (translations)
  • Change to the documentation

Related issues:

Fixes #1251

Checklist:

  • I have reviewed the guidelines about Contributing to HyperFormula and I confirm that my code follows the code style of this project.
  • I have signed the Contributor License Agreement.
  • My change is compliant with the OpenDocument standard.
  • My change is compatible with Microsoft Excel.
  • My change is compatible with Google Sheets.
  • I described my changes in the CHANGELOG.md file.
  • My changes require a documentation update.
  • My changes require a migration guide.

@sequba sequba self-assigned this Apr 27, 2023
@sequba
sequba marked this pull request as ready for review April 27, 2023 14:18
@sequba sequba linked an issue Apr 27, 2023 that may be closed by this pull request
@github-actions

github-actions Bot commented Apr 27, 2023 •

Copy link
Copy Markdown

Performance comparison of head (aee256f) vs base (37b96c7)

                                     testName |  base |  head |  change
-----------------------------------------------------------------------
                                      Sheet A | 750.5 | 759.2 |  +1.16%
                                      Sheet B | 270.9 | 267.2 |  -1.37%
                                      Sheet T | 291.1 |   288 |  -1.06%
                                Column ranges | 575.7 | 586.3 |  +1.84%
Sheet A:  change value, add/remove row/column |    35 |    35 |   0.00%
 Sheet B: change value, add/remove row/column |   315 |   324 |  +2.86%
                   Column ranges - add column |   381 |   202 | -46.98%
                Column ranges - without batch |   666 |   672 |  +0.90%
                        Column ranges - batch |   152 |   136 | -10.53%

@adamu-handsontable adamu-handsontable left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I wrote 3 more unit tests that could be helpful to prevent potential problems when function logic is changed.

Comment thread test/update-config.spec.ts Resolved
@sequba
sequba requested a review from adamu-handsontable May 5, 2023 09:00
@sequba
sequba requested a review from wszymanski May 16, 2023 10:48

@wszymanski wszymanski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGFM 👍

@codecov

codecov Bot commented May 18, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1256 (aee256f) into develop (37b96c7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1256   +/-   ##
========================================
  Coverage    97.19%   97.19%           
========================================
  Files          166      166           
  Lines        14238    14243    +5     
  Branches      2965     2966    +1     
========================================
+ Hits         13838    13843    +5     
  Misses         400      400           
Impacted Files Coverage Δ
src/HyperFormula.ts 99.59% <100.00%> (+<0.01%) ⬆️

@sequba
sequba merged commit 6911728 into develop May 18, 2023
@sequba
sequba deleted the feature/issue-1251 branch May 18, 2023 16:11
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.

updateConfig() should check if new config is the same as the old one

3 participants