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

bugfix/20968 synchronization of connector values - old PR #21242

Conversation

jomar-honsi
Copy link
Collaborator

@jomar-honsi jomar-honsi commented May 29, 2024

Tested with JSON connector and RangeModifier. Similar issues with other combinations of connectors/modfiers to be reported in separate tickets.

@highsoft-bot
Copy link
Collaborator

highsoft-bot commented May 29, 2024

File size comparison

Sizes for compiled+gzipped (bold) and compiled files.

master candidate difference
dashboards/dashboards.js 43.2 kB
148.7 kB
43.5 kB
149.6 kB
260 B
911 B
datagrid/datagrid.js 24.8 kB
76.9 kB
25.0 kB
77.8 kB
261 B
946 B

@highsoft-bot
Copy link
Collaborator

highsoft-bot commented May 29, 2024

Dashboard visual diffs

Visual differences found in:

  • /home/runner/work/highcharts/highcharts/cypress/snapshots/actual/test/cypress/dashboards/visual/dashboards-demo-minimal-loaded.png

See artifacts in the run summary for screenshots

@highsoft-bot
Copy link
Collaborator

highsoft-bot commented May 29, 2024

Lighthouse report

dashboards-demo-minimal.json

Reference Proposed Diff
performance – score 1 1 0.00
first-contentful-paint – score 1 1 0.00
first-contentful-paint – milliseconds 187.51 187.43 -0.08
first-meaningful-paint – score 1 1 0.00
first-meaningful-paint – milliseconds 446.64 440.19 -6.45
dom-size – score 1 1 0.00
dom-size – elements 344 344 0.00

@highsoft-bot
Copy link
Collaborator

Visual test results - No difference found

@highsoft-bot
Copy link
Collaborator

highsoft-bot commented May 29, 2024

Benchmark report - Dashboards

benchmarks/Dashboards/DataPool-CSV-constructor.bench.ts

Sample size This PR avg (ms) master avg (ms) Diff Percent diff
2500000 0.17 0.18 0 -3%
See all
Sample size This PR avg (ms) master avg (ms) Diff Percent diff
100 0.18 0.18 0 -1%
1000 0.17 0.17 0 2%
10000 0.17 0.17 0 1%
100000 0.18 0.17 0.01 4%
1000000 0.17 0.17 0 0%
2500000 0.17 0.18 0 -3%

benchmarks/Dashboards/DataTable-loading-rows.bench.ts

Sample size This PR avg (ms) master avg (ms) Diff Percent diff
2500000 755.93 753.52 2.42 0%
See all
Sample size This PR avg (ms) master avg (ms) Diff Percent diff
100 0.32 0.29 0.04 12%
1000 0.58 0.56 0.03 5%
10000 4.94 4.02 0.91 23%
100000 22.86 23.06 -0.2 -1%
1000000 294.73 295.32 -0.59 0%
2500000 755.93 753.52 2.42 0%

benchmarks/Dashboards/DataTable-loading-columns.bench.ts

Sample size This PR avg (ms) master avg (ms) Diff Percent diff
2500000 16.34 16.22 0.12 1%
See all
Sample size This PR avg (ms) master avg (ms) Diff Percent diff
100 0.28 0.25 0.03 11%
1000 0.28 0.26 0.02 6%
10000 0.31 0.28 0.02 9%
100000 2.34 2.3 0.04 2%
1000000 9.2 9.22 -0.02 0%
2500000 16.34 16.22 0.12 1%

@TorsteinHonsi
Copy link
Collaborator

(DO NOT MERGE )

You can use draft PRs to signalize that it is a work in progress

@jomar-honsi jomar-honsi marked this pull request as draft May 30, 2024 08:53
Copy link
Contributor

@bre1470 bre1470 left a comment

Choose a reason for hiding this comment

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

Nice! Looks good so far. 👍

Generating new row keys during setRows is missing.
And some things to consider below...

ts/DataGrid/DataGrid.ts Outdated Show resolved Hide resolved
ts/DataGrid/DataGrid.ts Outdated Show resolved Hide resolved
ts/Data/DataTableOptions.ts Outdated Show resolved Hide resolved
Copy link
Member

@vazonik vazonik left a comment

Choose a reason for hiding this comment

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

Wow, such a long branch name :D

Anyway, very good job! I only have a suggestion below that may slightly improve the performance.

And not so important, but for the future: branch names are included by default in messages of merge commits, so the shorter the better. Besides, most of us have a rule that PR name = branch name, I think it's worth using. (eg. dash/00000-short-description)

ts/Data/Connectors/JSONConnector.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@bre1470 bre1470 left a comment

Choose a reason for hiding this comment

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

Looking into the rowKeysId filtering it seems like there are some spots missing that need awareness for the hidden column:

  • DataTable.deleteColumnAlias
  • DataTable.deleteColumns
  • DataTable.renameColumn
  • DataTable.setCell
  • DataTable.setColumns

ts/Data/DataTable.ts Show resolved Hide resolved
ts/Data/DataTable.ts Outdated Show resolved Hide resolved
@jomar-honsi
Copy link
Collaborator Author

Looking into the rowKeysId filtering it seems like there are some spots missing that need awareness for the hidden column:

  • DataTable.deleteColumnAlias
  • DataTable.deleteColumns
  • DataTable.renameColumn
  • DataTable.setCell
  • DataTable.setColumns

Will fix.

@jomar-honsi jomar-honsi requested a review from bre1470 June 20, 2024 17:08
Copy link
Contributor

@bre1470 bre1470 left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

Just some nitpicking from my side...

ts/Data/DataTable.ts Outdated Show resolved Hide resolved
ts/Data/DataTable.ts Outdated Show resolved Hide resolved
@jomar-honsi
Copy link
Collaborator Author

Wow, such a long branch name :D

Anyway, very good job! I only have a suggestion below that may slightly improve the performance.

And not so important, but for the future: branch names are included by default in messages of merge commits, so the shorter the better. Besides, most of us have a rule that PR name = branch name, I think it's worth using. (eg. dash/00000-short-description)

I'll remember the branch length name next time.

Copy link
Collaborator

@TorsteinHonsi TorsteinHonsi left a comment

Choose a reason for hiding this comment

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

Looks good to me, just added some inline nitpicking 👍

ts/Data/DataTable.ts Outdated Show resolved Hide resolved
ts/Data/DataTable.ts Outdated Show resolved Hide resolved
ts/Data/DataTable.ts Outdated Show resolved Hide resolved
const id = this.rowKeysId;
if (id) {
return this.columns[id];
}
Copy link
Contributor

Choose a reason for hiding this comment

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

In this case we do not return anything.
IMO: return this.columns[id]; will return value or undefined, so the IF is unecessary.

Copy link
Collaborator Author

@jomar-honsi jomar-honsi Jun 26, 2024

Choose a reason for hiding this comment

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

I use the if because it gets rid of a lint error:
Type 'undefined' cannot be used as an index type.ts(2538)

Perhaps there is a more efficient solution?

const idxOrig = '' + rowKeyCol[idx];

return idxOrig.split('_')[1];
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The same as above

ts/Data/DataTable.ts Outdated Show resolved Hide resolved
@@ -681,6 +697,7 @@ class DataTable implements DataEvent.Emitter {

const column = table.columns[columnNameOrAlias];

// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason for it? I saw above that there is a problem with the linter, but what kind of issue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The issue is described here.

@jomar-honsi jomar-honsi changed the title 20968 synchronization of connector values editing between components does not work correctly for connectors with modifier 20968 synchronization of connector values Jun 26, 2024
@jomar-honsi jomar-honsi changed the title 20968 synchronization of connector values bugfix/20968 synchronization of connector values Jun 28, 2024
@jomar-honsi jomar-honsi deleted the 20968-synchronization-of-connector-values-editing-between-components-does-not-work-correctly-for-connectors-with-modifier branch June 28, 2024 14:03
@jomar-honsi jomar-honsi restored the 20968-synchronization-of-connector-values-editing-between-components-does-not-work-correctly-for-connectors-with-modifier branch June 28, 2024 14:11
@jomar-honsi
Copy link
Collaborator Author

The branch an PR have been renamed.

@jomar-honsi jomar-honsi reopened this Jun 28, 2024
@jomar-honsi jomar-honsi deleted the 20968-synchronization-of-connector-values-editing-between-components-does-not-work-correctly-for-connectors-with-modifier branch June 28, 2024 14:15
@jomar-honsi jomar-honsi changed the title bugfix/20968 synchronization of connector values bugfix/20968 synchronization of connector values - old Jun 28, 2024
@jomar-honsi jomar-honsi changed the title bugfix/20968 synchronization of connector values - old bugfix/20968 synchronization of connector values - old PR Jun 28, 2024
@jomar-honsi jomar-honsi restored the 20968-synchronization-of-connector-values-editing-between-components-does-not-work-correctly-for-connectors-with-modifier branch June 28, 2024 14:22
@jomar-honsi jomar-honsi deleted the 20968-synchronization-of-connector-values-editing-between-components-does-not-work-correctly-for-connectors-with-modifier branch June 28, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants