Code Monkey home page Code Monkey logo

Comments (4)

JohnnyMorganz avatar JohnnyMorganz commented on June 11, 2024 1

Just wanted to also mention, you can probably do this already either by using git diff --name-only or something like https://github.com/marketplace/actions/changed-files, then piping the list of changed files in as arguments to stylua (maybe with xargs)

from stylua-action.

JohnnyMorganz avatar JohnnyMorganz commented on June 11, 2024 1

Had a quick look, on my machine these file timings seems to be the slowest ones to me:

debug: formatted .\WeakAuras\Prototypes.lua in 4.3554156s
debug: formatted .\WeakAurasTemplates\TriggerTemplatesData.lua in 8.8273347s
debug: formatted .\WeakAurasModelPaths\ModelPathsClassic.lua in 128.721485s (!!)
debug: formatted .\WeakAurasModelPaths\ModelPathsBCC.lua in 401.1322888s (!!)
terminated on .\WeakAurasModelPaths\ModelPaths.lua, taking > 10mins

Everything else takes a second or less

Not too suprised on those ModelPaths ones (they are all large files, ModelPaths.lua is 13.3MB!) but I bet we can squeeze out some performance here. You may find that you just want to ignore the WeakAurasModelPaths directory in a .styluaignore file

from stylua-action.

JohnnyMorganz avatar JohnnyMorganz commented on June 11, 2024

Definitely sounds reasonable to add to me.

Slightly concerned about the 20min time to run the formatter though, I wouldn't expect it to take that long.
Is there anything in particular that stands out in taking a long time to format for you? Although if its an extremely large repo, then maybe it makes sense

If you pass the --verbose flag to stylua on the command line, it outputs timings

from stylua-action.

Stanzilla avatar Stanzilla commented on June 11, 2024

Just wanted to also mention, you can probably do this already either by using git diff --name-only or something like github.com/marketplace/actions/changed-files, then piping the list of changed files in as arguments to stylua (maybe with xargs)

Yup was considering doing that!

Here's the 20min https://github.com/WeakAuras/WeakAuras2/runs/7940500923?check_suite_focus=true

from stylua-action.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.