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

Matching/Locating can be slow #2

Closed
peabnuts123 opened this issue Sep 11, 2017 · 7 comments
Closed

Matching/Locating can be slow #2

peabnuts123 opened this issue Sep 11, 2017 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@peabnuts123
Copy link

I'd like to use this wonderful customisable extension in favour of the framework-specific extension Ember Related Files. So I've written some rules for Ember which I am happy to share when I've finished them. However, i've found that in my project (of >2000 files) the pattern matching / locating can run a bit slowly. As pictured:

related-files-delay

This is a bit of a pain. The Ember related files extension linked above does not have this delay, so I'm assuming there is some optimisation to be had.

For extra reference, here is my ruleset so far. It is also worth noting that I ONLY have this ruleset enabled, so it is only matching against these 5 rules:

"findrelated.rulesets": [
    {
      "name": "ember",
      "rules": [
        /* Component Templates */
        {
          "pattern": "(app)/templates/components/(.*)\\.hbs$",
          "locators": [
            "$1/components/$2.js"
          ]
        },
        /* Components */
        {
          "pattern": "(app)/components/(.*)\\.js$",
          "locators": [
            "$1/templates/components/$2.hbs"
          ]
        },
        /* Route Templates */
        {
          "pattern": "(app)/templates/(.*)\\.hbs$",
          "locators": [
            "$1/controllers/$2.js",
            "$1/routes/$2.js"
          ]
        },
        /* Routes */
        {
          "pattern": "(app)/routes/(.*)\\.js$",
          "locators": [
            "$1/templates/$2.hbs",
            "$1/controllers/$2.js"
          ]
        },
        /* Controllers */
        {
          "pattern": "(app)/controllers/(.*)\\.js$",
          "locators": [
            "$1/templates/$2.hbs",
            "$1/routes/$2.js"
          ]
        }
      ]
    }
  ]
@eamodio eamodio added the bug Something isn't working label Sep 12, 2017
@eamodio
Copy link
Owner

eamodio commented Sep 12, 2017

@peabnuts123 do you have a public repo where this is reproducible? I'd love to try some profiling, but would be great if I can see the same issues as you.

@peabnuts123
Copy link
Author

I don't sorry, as my codebase is a for a client at work. I'm sure you can locate a significantly sized Ember project somewhere on GitHub. Conversely, I cab also test it on a project that is significantly smaller than my current one and see if it is the size or another factor making it slow.

eamodio added a commit that referenced this issue Oct 12, 2017
@eamodio
Copy link
Owner

eamodio commented Oct 12, 2017

@peabnuts123 I just pushed 0.6 to the marketplace -- with any luck this will help with the perf issues. Please let me know, thanks!

@eamodio eamodio self-assigned this Oct 12, 2017
@peabnuts123
Copy link
Author

Wicked! I will check it out 😃

@peabnuts123
Copy link
Author

Yes! It does appear to be performing perfectly now. I did also face / resolve some system performance issues around the search service since I made this issue which I'm sure had an impact too. Great job. I am definitely going to be adopting this now, would love to see something like #3 happen 😁

@eamodio
Copy link
Owner

eamodio commented Oct 18, 2017

@peabnuts123 Excellent! re: #3 -- PR's are always greatly appreciated ;)

@eamodio eamodio closed this as completed Oct 18, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants