Closed kanekv closed 10 years ago
Could you send the full startup log and your computer specs? It normally doesn't take so long to boot for my projects.
I'm running it in the vagrant VM (virtualbox) host machine is Macbook Air I7 2Hz. How can I get full startup log, enable debug mode?
Also, is it possible to force activate to do initialization on startup (non-lazy)?
@Kane-Sendgrid I think you don't need to activate the debug mode to obtain the full log. Among the lines you sent should be others with more details.
You can force the persistence context load during the application startup using an empty transactional block "transactional{}". For example, we normally use the Global.start method on Play to do this.
@fwbrasil I don't see any other log lines related to the activate, can you give a hint what lines you expect to see?
Thanks for the info about transactional!
@fwbrasil Also, what is difference between asyncTransactional and asyncTransactionalChain?
@Kane-Sendgrid Could you try to configure the log level to DEBUG and post the logs here?
You can find more info about the async transactions in this doc:
https://github.com/fwbrasil/activate/blob/master/activate-docs/transaction.md#async-transactions
Please use the mailing list if you need more info about it.
@fwbrasil, thanks, where is mailing list btw?
@Kane-Sendgrid here it goes: https://groups.google.com/forum/#!forum/activate-persistence
@fwbrasil
I have been experimenting the same problem, because I am a little new in scala world I thought that the problem was a scala compiler performance issue. But then I detect that the source is the issue described here. My project is a Play application with around 25 entities and a lot of play html templates. Perhaps this issue is not a problem in a microservice arquitecture.
You have a way to measure the source of it. It could be the scanning/searching of classes that are Entity or is more the use of reflection in each of those entities??
Could you gave me a pointer to the class that makes the inicialization??
When i try to access database for the first time it takes a lot of time to initialize: Reflections took 1945 ms to scan 2 urls, producing 43 keys and 805 values Reflections took 1103 ms to scan 4 urls, producing 158 keys and 3581 values Initializing live cache for context Connection Initializing context Connection
Is there a way to improve it or at least make it non-lazy, so it initializes right after start? What's the best approach to make development cycle faster, it's pretty frustrating to wait several seconds every time after reload