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

server/invalidate calls Path.UniqueKey.create for every cached module #9509

Closed
nadako opened this issue May 29, 2020 · 5 comments · Fixed by #9535
Closed

server/invalidate calls Path.UniqueKey.create for every cached module #9509

nadako opened this issue May 29, 2020 · 5 comments · Fixed by #9535
Assignees
Milestone

Comments

@nadako
Copy link
Member

nadako commented May 29, 2020

...which, as we figured, doesn't scale well when your project has thousands of modules :)

@nadako
Copy link
Member Author

nadako commented May 30, 2020

As @Neu2o mentioned, apparently, what we use for get_full_path on Windows is not an actual filesystem access, but a string manupulation function, which explains why it's faster on Windows, unlike realpath on Unix, which resolves symlinks and such. It might make sense to find/write a simple path canonicalization function for unixes to make them faster there too. (This is of course unrelated to the original issue, we still shouldn't do any syscalls there in the first place).

@RealyUniqueName
Copy link
Member

@nadako I've pushed an implementation, which doesn't access file system. Could you please compare unix/windows again?

@nadako
Copy link
Member Author

nadako commented Jun 4, 2020

Will do when I have some time ^^

RealyUniqueName added a commit to RealyUniqueName/haxe that referenced this issue Jun 4, 2020
RealyUniqueName added a commit that referenced this issue Jun 5, 2020
* added `module_def_extra.m_file_key` (#9509)

* added a cache for file keys in common and eval contexts

* UniqueKey.lazy_t & api
@RealyUniqueName
Copy link
Member

This can't go into "Hotfix", because it already generates too many conflicts with 4.1_bugfix branch.

@RealyUniqueName RealyUniqueName modified the milestones: Hotfix, Release 4.2 Jun 18, 2020
@RealyUniqueName
Copy link
Member

However, I've cherry-picked "m_file" change into "Hotfix" as it's a small and isolated change and it optimizes "server/invalidate" requests.

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

Successfully merging a pull request may close this issue.

2 participants