greenlaw110/play-morphia — Issue #65: Initial mapping takes too long
Author: ahmetalpbalkan
Created: 2012-02-02 14:17:23+00:00
State: open

When I run my Play application locally, Morphia initialization and enhancement steps take ~25 seconds on my Macbook Pro computer, and on my server, around 15 seconds.

```
16:13:12,017 DEBUG ~ MorphiaPlugin-1.2.4a> enhancing models.ApiClient ...
16:13:15,373 DEBUG ~ MorphiaPlugin-1.2.4a> enhancing models.Post ...
16:13:15,609 DEBUG ~ MorphiaPlugin-1.2.4a> enhancing models.Location ...
16:13:16,442 DEBUG ~ MorphiaPlugin-1.2.4a> enhancing models.User ...
16:13:17,267 DEBUG ~ MorphiaPlugin-1.2.4a> enhancing models.Item ...
16:13:29,594 DEBUG ~ MorphiaPlugin-1.2.4a> reading configuration
16:13:40,681 DEBUG ~ MorphiaPlugin-1.2.4a> mapping class: models.ApiClient
16:13:41,009 DEBUG ~ MorphiaPlugin-1.2.4a> mapping class: models.Post
16:13:41,015 DEBUG ~ MorphiaPlugin-1.2.4a> mapping class: models.Location
16:13:41,023 DEBUG ~ MorphiaPlugin-1.2.4a> mapping class: models.User
16:13:41,024 DEBUG ~ MorphiaPlugin-1.2.4a> mapping class: models.Item
16:13:41,368 INFO ~ MorphiaPlugin-1.2.4a> initialized
```

Here you can see, it took 29 seconds to register models to Morphia. My entity classes are not too complicated, ~8 fields each and does not have `@Reference` annotations etc.

I moved play-morphia plugin folder to my project `modules/` folder, that's how I use it but I think that's not related.

Is it a known issue or just me?