puniverse / comsat

Fibers and actors for web development
docs.paralleluniverse.co/comsat
Other
598 stars 103 forks source link

AutoWebActorHandler filtered scan #56

Closed roded closed 8 years ago

roded commented 8 years ago

AutoWebActorHandler currently scans the entire classpath for @WebActor annotated classes. In my case, this is a shame as there's a single @WebActor annotated class to be found.

As I rather not lose the convenience of the AutoWebActorHandler, I'm wondering if it would be possible to allow the handler to accept a specific package name for scanning in order to save some of the loading time.

circlespainter commented 8 years ago

Something can surely be done; how significant in your case is the bootstrap slowdown due to the @WebActor-related classpath scanning?

roded commented 8 years ago

Locally the scan takes around 5 seconds (+/- depending on debugging and etc.). It would be a nice delay to cut.

circlespainter commented 8 years ago

Could you try with a 0.7.1-SNAPSHOT built from the impl-56 branch? You can now construct Undertow's and Netty's AutoWebActorHandler by passing a list of packages to limit the class loading from: let me know if and by how much this improves your bootstrap time.

roded commented 8 years ago

That brought it down to less than 2 seconds which is great (I didn't bother doing any actual measurements though). Thanks!

circlespainter commented 8 years ago

Good! You should now be able to download a 0.7.1-SNAPSHOT containing the feature from SonaType too.