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

Grapher baking performance enhancements #3482

Merged
merged 5 commits into from
May 1, 2024

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Apr 11, 2024

Various attempts to improve #3462

@ikesau ikesau self-assigned this Apr 11, 2024
@marcelgerber marcelgerber force-pushed the baking-perf-enhancements branch from 71101e6 to f9f3bdd Compare April 25, 2024 20:21
@marcelgerber marcelgerber requested a review from danyx23 April 25, 2024 20:57
@marcelgerber
Copy link
Member

Continued to work on this for a bit, think this is ready for review now.

Observed performance of yarn runLocalBake --steps charts on my machine has doubled - from roughly 8 charts/s to roughly 15 charts/s (if they are unchanged).

@marcelgerber marcelgerber marked this pull request as ready for review April 25, 2024 21:00
export class AddPostsSlugIndex1712842552502 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`-- sql
ALTER TABLE posts ADD INDEX idx_posts_slug (slug(100));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should bump this to 130 maybe? The longest slug in my snapshot is 122 chars long. As far as I understand indices in mysql this would still work but why not make it a bit bigger and then all values will fit.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, I honestly don't think it's necessary (unless we would want this index to be unique).
Otherwise, there are quite certainly not gonna be two slugs whose prefixes of length 100 are the same length, and then it's just the same.

Copy link
Contributor

@danyx23 danyx23 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! I think we should maybe bump the index size up a bit but it should work also without that.

@marcelgerber marcelgerber merged commit 11b1d80 into master May 1, 2024
23 of 25 checks passed
@marcelgerber marcelgerber deleted the baking-perf-enhancements branch May 1, 2024 09:18
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.

3 participants