miksturait / cucumber_fm-plugin

Help to manage with big amount of features in project (gui for rails)
http://cucumber.fm
MIT License
96 stars 2 forks source link

ruby process burns with 100% #27

Closed basiszwo closed 12 years ago

basiszwo commented 13 years ago

I installed cucumber_fm with script/plugin install ... then I installed the diff-lcs gem. trying to request /documentation/features results in a cpu load of 100% without loading anything.

The only thing in the log is


Processing Documentation::FeaturesController#index (for 127.0.0.1 at 2010-12-06 22:28:24) [GET]
Rendering template within documentation/layouts/cucumber_fm
Rendering documentation/features/index

My system:

Is cucumber_fm really just working with rails 2.3.8 and not 2.3.9 or 2.3.10? If yes, my question is why nothing gets loaded, my page stays blank and my cpu burns without any message in the log?

Thanks!

cs3b commented 13 years ago

I'm unable to replicate you env exactly. But i make short test with ree and rails 2.3.9

rvm gemset create 2_3_9
rvm use ree@2_3_9
gem install rails -v 2.3.9
rails cucumber_fm_test_2_3_9
cd cucumber_fm_test_2_3_9/
script/plugin install git@github.com:cs3b/cucumber_fm.git
gem install diff-lcs
mkdir features
script/server

the only problem that i have was connected json gem required, so i added this

# config.gem json
gem install json
script/server

and documentation pages rendered very fast

in Selleo we are using cucumber_fm on 4 projects ( one on rails 2.3.5, rest of them are 3.0 and up ) and i havent notify any big cpu overloading. In one of this projects we have more then 1600 scenarios and 300 files - rendering pages takes about 4 seconds - most of the time it's rendering, it generates 0.7MB of HTML.

1) first check if application starts correctly

2) install json gem - require it in environment

3) if you are running application in development env and there is no information in logs, check database connection

4) try use console to execute: cfm = CucumberFeatureManager.new(Rails.root.join('features'), Rails.root, {}) cfm.features.count cfm.scenarios.count

and let me know what are your results ( does console process also takes so much cpu resource, does it provide you correct information ) ?

cs3b commented 13 years ago

One of the reason of this could be to restrictive regex for scenario outline, i have made some very quick patches ( they are not absolute, but this point where the problem is).

This is regex is stil broken but now it should works, try it and let me now if its ok.

https://github.com/cs3b/cucumber_fm/commit/179b7e94fec463c1aba1e5559be92f864cb338a5

cs3b commented 12 years ago

already solved