DCOM-176: [GH-256] Refactored AnnotationDriver to handle only required classes #478

doctrinebot opened this Issue Mar 1, 2013 · 3 comments

2 participants


Jira issue originally created by user @beberlei:

This issue is created automatically through a Github pull request on behalf of mattcockayne:

Url: #256


Whilst debugging an issue I was having I found that the AnnotationDriver uses getdeclaredclasses() and iterates over the result to identify classes that should be handled.

This seems like a ridiculous overhead especially as it then instantiated a ReflectionClass for each declared class. As an example my current project was iterating over 522 items when it needed to only handle 6.

I've kept the alterations to a minimum but it now takes a snapshot of the declared classes before and after the require for the files and then uses array_diff to get only the classes we are targeting.


Issue was closed with resolution "Invalid"


Comment created by @ocramius:

Patch breaks logic when files where already included


Comment created by @beberlei:

A related Github Pull-Request [GH-256] was closed

@doctrinebot doctrinebot added the Bug label Dec 6, 2015
@Ocramius Ocramius was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment