Middleman server 3.0 taking 1-2 minutes to render pages on Windows 7
When viewing files on localhost:4567, the example page that is created by middleman init takes 1-2 minutes to load.
No error is output in CMD where middleman server is running.
I have a similar problem: for me the page does not load at all. I'm using Windows 7 64 bit. Also, building via the build command works just fine. The problem is also not limited to the port, as 5500 doesnt work either.
When I get a chance next week, I'll run the server with some ruby-prof stuff hacked in and try to see where the time is going. If you guys are feeling adventurous you could take a look before that ;-)
BTW, what version of Ruby are you guys running?
Currently I'm running 1.9.3p125.
We had it happen with a couple versions. But I think we were on 1.9.3p125 during the problem.
I'm not going to be much help on this one. We're using Middleman for mission-critical stuff and I can't take the time to log bugs. So we're sticking with 2.x through the end of our project.
Yeah. I can confirm this. I am trying to install today middleman on designer's machine (windows 7 x64) and I can say how to reproduce this problem:
- ruby 1.9.3-p194 and mingw x86 (devkit) from rubyinstaller
- install curl and git in global system (just google installers for windows)
- install mingw-get from sourceforge in local (mingw)
- run
mingw-get install pthreads - install openssl and zlib from gnu win32 in local (mingw)
- nodejs v0.4.12 via
configure --prefix=/ && make && make install - Gemfile gem "middleman", :git => "git://github.com/middleman/middleman" gem "eventmachine", :git => "git://github.com/eventmachine/eventmachine.git" gem "win32-open3-19", :platforms => :mingw
middleman build => works perfectly and result is perfect too middleman -p 3000 => bind to address succesfully from my machine: time curl http://192.168.1.101:3000/scenes.xml (scenes.xml.haml < 1kb) real 0m29.982s time curl http://localhost:3000/scenes.xml real 0m0.016s ruby process on windows machine: 0% 36 mb
Wondering if going back to Thin for Windows might help.
If somebody could check out middleman from master on windows, run it with --profile, and send over the results in the profile directory, that would help.
profile. Suddenly --disable-watcher fixed this issue. I will try to go back to Thin now
Yeah. thin web server fixed this issue. I am just run bundle exec thin -R config.ru -p 3000 start and it works fast. thanks ^____^
Hmm... If I use thin webserver such way it doesn't watch file changes. The same thing happens if I use middleman --disable-watcher. I suppose this is a bug in file watcher. Unfortunately I have no much time now to look in deep
PS the latest working middleman on windows 7 x64 is 2.0.16. but eventmachine 1.0.0.beta.3 threw an segfault just after middleman start. I've changed dependency to 1.0.0.rc.4 (in middleman-x86-mingw32.gemspec) and it works perfect
config.ru doesn't use the file watcher, so I'm thinking that may be the culprit.
Thanks @andrew-aladev, we'll release an emergency update for windows 2.x
Yeah, it's pretty clear from the profiling info that starting the file watcher in Windows is super slow - both the part that figures out which adapter to use, as well as the actual windows-specific adapter.
There's also a lot of time going into Middleman#rubygems_latest_specs which is weird because I thought we skipped that when Bundler was in charge.
@bhollis Sprockets?
@andrew-aladev Just released middleman-2.0.16.1-x86-mingw32 with the updated eventmachine dep.
Yeah that's gotta be sprockets
On Aug 2, 2012, at 12:28 PM, Thomas Reynolds [email protected] wrote:
@bhollis Sprockets?
Reply to this email directly or view it on GitHub: https://github.com/middleman/middleman/issues/529#issuecomment-7465588
@tdreyno thanks. 2.0.16 works perfect on windows now
Any progress on this for 3.0?