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

Do not deepcopy the cache! #158

Merged
merged 2 commits into from
May 29, 2024
Merged

Do not deepcopy the cache! #158

merged 2 commits into from
May 29, 2024

Conversation

jfennick
Copy link
Contributor

Deepcopy'ing the cache is unnecessary and is causing massive performance problems for certain uses cases (specifically, large directories). This change fixes the performance problems.

Signed-off-by: Jake Fennick <[email protected]>
@jfennick
Copy link
Contributor Author

Looks like PRs should be opened against the dev branch?

@trungdong
Copy link
Owner

Thank you for the suggestion. I agree that the deepcopy operation was unnecessary (on the namespace's cache and other parts).

Your suggested edit, however, still uses deepcopy. I would suggest the following:

                # Do not reuse the namespace object, making an identical copy
                ns = self.add_namespace(Namespace(namespace.prefix, namespace.uri))

and we can also remove the deepcopy import that is no longer required.

@trungdong trungdong merged commit ec9d8c8 into trungdong:master May 29, 2024
5 checks passed
@trungdong
Copy link
Owner

@jfennick Merged. Thanks a lot!

@jfennick
Copy link
Contributor Author

No problem! Any chance for a point release soon? We have some users that are currently affected by this.

@trungdong
Copy link
Owner

No promise, but I will try to make a release this weekend.

@trungdong
Copy link
Owner

@jfennick I've made a release. Sorry for the delay.

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.

2 participants