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

DeferredDataElement deprecation #291

Closed
scaramallion opened this issue Jan 15, 2017 · 2 comments · Fixed by #683
Closed

DeferredDataElement deprecation #291

scaramallion opened this issue Jan 15, 2017 · 2 comments · Fixed by #683
Milestone

Comments

@scaramallion
Copy link
Member

I've been looking through the code in dataelem.py and noticed that DeferredDataElement seems to be broken. The value getter calls self.read_value() which doesn't exist, as far as I can tell. The class doesn't seem to be used anywhere, doesn't have test coverage and hasn't changed since you moved to github, so I was wondering if it's still supported or if it should be removed?

@darcymason
Copy link
Member

Good question. I would like to deprecate it. It causes a lot of complication to the code, and the better solution is the memmap one (#139). The defer concept still loads the entire thing into memory if/when you finally do access it, and with very large files that is not desirable. I think the memmap path can be set up to act very similarly to deferral, but with the extra bonus of never pulling into real memory if the user wants.

I don't think the deferred read was used extensively by users, but that is just a guess. Perhaps a deprecation message in the pydicom 1.0 line would be wise, with removal in 1.2 or 1.3 when the memmap code has been developed and tested (both in unit tests and in real-world use).

However, if anyone still needs the deferred concept, I'd love to hear about that and we can consider whether to keep it for a while longer.

@darcymason
Copy link
Member

Setting milestone here to start deprecating DeferredRead in v1.1 (#139 memmap solution to be implemented in that milestone).

@darcymason darcymason added this to the v1.1 milestone Jul 11, 2017
@darcymason darcymason changed the title DeferredDataElement deprecated? DeferredDataElement deprecation Jul 11, 2017
@mrbean-bremen mrbean-bremen modified the milestones: v1.1, v1.2 Jul 18, 2018
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.

3 participants