-
Notifications
You must be signed in to change notification settings - Fork 44
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
[FIX] pivot: finer grained cycle detection #5026
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -709,7 +709,11 @@ export const PIVOT_VALUE = { | |
const pivot = this.getters.getPivot(pivotId); | ||
const coreDefinition = this.getters.getPivotCoreDefinition(pivotId); | ||
|
||
addPivotDependencies(this, coreDefinition); | ||
addPivotDependencies( | ||
this, | ||
coreDefinition, | ||
coreDefinition.measures.filter((m) => m.id === _measure) | ||
); | ||
pivot.init({ reload: pivot.needsReevaluation }); | ||
const error = pivot.assertIsValid({ throwOnError: false }); | ||
if (error) { | ||
|
@@ -747,7 +751,7 @@ export const PIVOT_HEADER = { | |
assertDomainLength(domainArgs); | ||
const pivot = this.getters.getPivot(_pivotId); | ||
const coreDefinition = this.getters.getPivotCoreDefinition(_pivotId); | ||
addPivotDependencies(this, coreDefinition); | ||
addPivotDependencies(this, coreDefinition, []); | ||
pivot.init({ reload: pivot.needsReevaluation }); | ||
const error = pivot.assertIsValid({ throwOnError: false }); | ||
if (error) { | ||
|
@@ -813,7 +817,7 @@ export const PIVOT = { | |
const pivotId = getPivotId(_pivotFormulaId, this.getters); | ||
const pivot = this.getters.getPivot(pivotId); | ||
const coreDefinition = this.getters.getPivotCoreDefinition(pivotId); | ||
addPivotDependencies(this, coreDefinition); | ||
addPivotDependencies(this, coreDefinition, coreDefinition.measures); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So now we can reference headers of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yes, but it'd be quite difficult I think. Every cell would need to be computed in the correct dependency order, when they are needed. |
||
pivot.init({ reload: pivot.needsReevaluation }); | ||
const error = pivot.assertIsValid({ throwOnError: false }); | ||
if (error) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated: what's the state of this TODO ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think it's still a todo until we find it to be a real bottleneck ;-)