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

feat: get bounds optimization #92

Merged
merged 1 commit into from
Dec 5, 2023
Merged

Conversation

KirillBobkov
Copy link
Contributor

image

@KirillBobkov KirillBobkov added the enhancement New feature or request label Dec 4, 2023
@@ -228,7 +228,8 @@ export class ChartComponent extends ChartBaseElement {
new MainChartHistogramDrawer(this.config.components.chart.histogram),
);

const mainChartBoundsProvider = () => this.canvasBoundsContainer.getBounds(CanvasElement.PANE_UUID(CHART_UUID));
const chartPaneId = CanvasElement.PANE_UUID(CHART_UUID);
const mainChartBoundsProvider = () => this.canvasBoundsContainer.getBounds(chartPaneId);
Copy link
Contributor

Choose a reason for hiding this comment

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

have you tried to remove "provider" logic at all and pass bounds as is without function? I think it might work since bounds is mutable and new instance shouldn't be created

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that if we want to pass bounds as mutable object, we need to refactor all places with such provider logic.
It it very important to keep app stable, because for now we don't have much QA forces.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But you're right, it might work, even faster than now.

@disyakidneyshot disyakidneyshot merged commit ba72d34 into master Dec 5, 2023
2 checks passed
@disyakidneyshot disyakidneyshot deleted the get-bounds-optimization branch December 5, 2023 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants