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

Fix performance regression in compiler around behaviours #2001

Merged
merged 1 commit into from
Jan 23, 2019

Conversation

ferd
Copy link
Collaborator

@ferd ferd commented Jan 23, 2019

When the commit at 8c4a74a
introduced a recursive search for build elements, it accidentally did so
using a function that accepts a regex for its match.

In doing so, if a behaviour or include had a name such as
common_prefix and that multiple other modules used the name
common_prefix_<rest_of_name>, all the other files would be seen as
dependencies to be checked in a directed graph.

This resulted in continuous re-checking of files that kept depending on
each others and blew the compile time up exponentially.

By using a delimitation on the regex (^<modulename>$), the build comes
back down to finding only the right files and becomes fast again.

Fixes #1997

When the commit at
erlang@8c4a74a
introduced a recursive search for build elements, it accidentally did so
using a function that accepts a regex for its match.

In doing so, if a behaviour or include had a name such as
`common_prefix` and that multiple other modules used the name
`common_prefix_<rest_of_name>`, all the other files would be seen as
dependencies to be checked in a directed graph.

This resulted in continuous re-checking of files that kept depending on
each others and blew the compile time up exponentially.

By using a delimitation on the regex (^<modulename>$), the build comes
back down to finding only the right files and becomes fast again.
@ferd ferd changed the title Fix performance regression in compiler Fix performance regression in compiler around behaviours Jan 23, 2019
@ferd ferd merged commit 369ff85 into erlang:master Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

super slow rebar3 compile starting in 3.7.5
2 participants