I think a lot of the boot time maybe down to datamapper, but not sure.

recently i upgraded from edge, and things are a bit faster. the gem
version #s are still the same, so hard to give a differentiation, but
in the last 24 hours, a noticeable speedup.

rightn now, on a macbook I get:

35 seconds starup/overhead
and <1s for a simple test.

so, its kind of like writing C code and waiting for a compiler. sai-
yaku.

i now have a strategy of testing with "load" until things are kind of
working - at least this keeps the application running and only loads
the file under scrutiny.
if merb+dm is 30s to boot, maybe we need to have a "hot test"
framework that can load + overwrite stuff on the fly...?

  if Merb.env == "development" then
    load "somefile.rb"
  end

by comparison
merb+dm = 35secs
rails + AR = 5 secs

IMHO theres a certain threshold around 8s for running tests, that
makes them a PITA.

I'm not really sure where to start to try and help on this issue. if
someone can suggest things to investigate I can certainly throw some
resources at it, as its costing my team a lot of productivity.



[EMAIL PROTECTED]:merbquest/trunk]$ time spec spec/models/
user_icon_spec.rb                                           (10-02
15:29)
P

Pending:
User should have a rendered icon (depends on render process
running...)

Finished in 0.910466 seconds

1 example, 0 failures, 1 pending
spec spec/models/user_icon_spec.rb  23.88s user 1.56s system 69% cpu
36.661 total
[EMAIL PROTECTED]:merbquest/trunk]$

------

[EMAIL PROTECTED]:mamori/trunk]$ time ruby test/unit/
encounter_test.rb
(10-02 15:46)
/Users/dc/svn/mamori/trunk/config/environment.rb:77: warning: already
initialized constant ADWAYS
Loaded suite test/unit/encounter_test
Started
.
Finished in 0.259609 seconds.

1 tests, 1 assertions, 0 failures, 0 errors
ruby test/unit/encounter_test.rb  2.45s user 0.72s system 62% cpu
5.084 total
[EMAIL PROTECTED]:mamori/trunk]$



/dc

On 10月1ζ—₯, 午後4:12, "Michael Klishin" <[EMAIL PROTECTED]>
wrote:
> 2008/9/29 Ben Burkert <[EMAIL PROTECTED]>:
>
> > perhaps the rake and test environments can be modified to use Michael's
> > "fast boot"?
>
> I implemented fast boot approach on my local branch yesterday. The
> problem I found is that we need a separate method
> for it. I tried to modify start_environment first, but it's a bit
> tricky: for instance, Merb core spec suite needs server boot
> sometimes,
> and it uses start_environment. So we cannot make assumption on what
> partial boot should look like.
>
> Another approach I tried (and it worked) is to add options to
> Merb#start so it can figure out you don't want to run the server.
> No running server makes everything faster.
>
> In case of merb-gen you can see that it only needs to boot your app to
> the point when it can read config file to figure out your ORM,
> template engine and what you test with, that is, defaults.
>
> My ideas are:
>
> (a) Add optional :no_server_boot to Merb#start and modify generated spec 
> helper.
> (b) Add some new method that only runs certain bootloaders.
> (c) Add :exclude and :only options to Merb::BootLoader.run.
>
> We can implement all of those actually. What do you think?
> --
> MK
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to