Skip to content

assets_hash is slow to iterate over entire directory tree (ruby-stylus + sprockets + bower) #76

Description

@ajb

After starting to using rails-assets to manage dependencies, we noticed that asset compilation was taking 500% longer than normal -- up to 5 minutes, sometimes. After two days of digging, I found that the assets_hash method was calling Sprockets' each_logical_path method, which iterates over every directory, even the ones in our new vendored bower assets. So for stuff like jquery-ui, with tons of subdirectories and images, ruby-stylus was building up an assets_hash that included all of them.

I'm not sure there's a fix for this in this library's current implementation, but I would definitely hope it gets considered a bug. I'd imagine that when the assets_hash method was implemented, this edge case was simply not thought of.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions