Skip to content

[4.x] Avoid expensive file copy when using local source filesystem - #7887

Merged
jasonvarga merged 2 commits into
statamic:4.xfrom
FrittenKeeZ:feature/glide-attribute-tweaks
Aug 9, 2023
Merged

jasonvarga merged 2 commits into
statamic:4.xfrom
FrittenKeeZ:feature/glide-attribute-tweaks

Conversation

@FrittenKeeZ

Copy link
Copy Markdown
Contributor

No description provided.

@jasonvarga

Copy link
Copy Markdown
Member

This feels like an existing issue but I'm having trouble finding it. Do you know if there's a related issue?

@FrittenKeeZ

Copy link
Copy Markdown
Contributor Author

@jasonvarga yeah, it's this one #6495

@jasonvarga

Copy link
Copy Markdown
Member

I see no mention of attributes on that issue.

@FrittenKeeZ

Copy link
Copy Markdown
Contributor Author

@jasonvarga no, this is something we discovered while working on the new Comwell site

@jasonvarga

Copy link
Copy Markdown
Member

I just feel like this specifically was discussed before. Maybe it was in Discord. 🤷

Do you have a good way to benchmark the before/after of this change?

@FrittenKeeZ

Copy link
Copy Markdown
Contributor Author

@jasonvarga we're just in the end of our deadline for going live with a new project, but I'll have a look at it when I get some breathing space

@statamic statamic deleted a comment from what-the-diff Bot Aug 9, 2023
@jasonvarga

Copy link
Copy Markdown
Member

I did a naive benchmark. Put this in a template:

{{ assets container="assets" }}
    <li>{{ path }}</li>
{{ /assets }}

Filled an asset directory with a whole bunch of assets, deleted the .meta directory, cleared the cache, then looked at how long the tag took to render using the Antlers profiler.

~870ms before, ~315ms after.

Not really sure what situation you were in that this was affecting you drastically though. This only gets run when generating the .meta files. Regardless, nice improvement. Thanks and sorry for the delay.

@jasonvarga
jasonvarga changed the base branch from 3.4 to 4.x August 9, 2023 21:21
@jasonvarga jasonvarga changed the title Avoid expensive file copy when using local source filesystem [4.x] Avoid expensive file copy when using local source filesystem Aug 9, 2023
@jasonvarga
jasonvarga merged commit 1c81412 into statamic:4.x Aug 9, 2023
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.

2 participants