Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Filesystem] Cache more calls in Path #58890

Copy link
Copy link
Open
@Toflar

Description

@Toflar
Issue body actions

Description

In our project, we use Path::makeRelative() quite extensively. In 90% of all cases $basePath is identical. But still, Symfony calls self::split($basePath) on this on every single call wasting lots of resources.

We already cache the results of canonicalize() in $buffer with some $bufferSize "magic". Before creating a PR, I wanted to ask which way we should go here. There's actually a lot that could be cached in this utility class. Who defines which methods qualify for a static buffer?

And is that buffer handling even the correct approach? Should't we have a static reset() or so? Should the existing filesystem service call Path::reset() then?

Wdyt?

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    DXDX = Developer eXperience (anything that improves the experience of using Symfony)DX = Developer eXperience (anything that improves the experience of using Symfony)FilesystemStalled

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.