Skip to content

Latest commit causes massive slowdown on writing to models #1291

@jonnywilliamson

Description

@jonnywilliamson

Versions:

  • ide-helper Version: last commit #29dd57e1e27540cefea914500fc6cca3ee33dbed
  • Laravel Version: 8.77.1
  • PHP Version: 8.0

Description:

Using the absolute latest commit of this package this evening when wanting to test out the new support for attributes in 8.77 (#1289), I noticed that the generation/writting to the models was SO much slower than it ever has been in the past.

I checked out multiple commits and the only one to show this issue was the one commited today (#29dd57e1e27540cefea914500fc6cca3ee33dbed)

I took a video to show the difference. Normally I'd speed up the video but in this case it makes more sense to let it run in real time. This is what I did.

  • I installed the SECOND most recent commit (#6244a931a00ee313a7081a86d217fbb8e48c7aad) in my project.
  • As part of my composer.json post-update-cmd is the following command
        "post-update-cmd": [
             <snip>
            "@php artisan ide-helper:models --smart-reset --phpstorm-noinspections --write",
             <snip>
        ],

Just after that gets installed you can see it writting new docblocks to all my models. It takes less than a second and whizzes through.

  • Then I install the latest commit (#29dd57e1e27540cefea914500fc6cca3ee33dbed).
  • Watch how it takes nearly 30secs to go through all the models.

Something in the latest commit with the new attribute support is causing a lareg slow down but I don't know where or how to debug why it's taking so much time.

I hope the video helps explain it better! It's about a minute long.

Thank you!

https://youtu.be/c8elNXVuEiA

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions