Strider-CD / strider-custom

Support for custom prepare, test and deploy phases in Strider
9 stars 7 forks source link

forkProc slow #8

Closed sebv closed 10 years ago

sebv commented 10 years ago

I am trying to run the yeoman build script within strider in a ubuntu VM, and it takes forever. When I run the same script on the same box using sh, it takes a few seconds.

Looking at the code, it looks like the forkProc must be restricting resources. I am trying to track this down, but is there a quick fix for this kind of issues?

Thanks.

sebv commented 10 years ago

Actually, looking at the log, it looks like the job finishes, but the terminal display hangs and the next command in the script is never run.

sebv commented 10 years ago

REMOVED (better fix below)

sebv commented 10 years ago

Narrowed it down to the line below. This breaks the terminal.

echo "TEST STARTING"
echo '<script src="scripts/modules.js" changed to <script src="scripts/97983566.modules.js"'
echo '<script src="scripts/scripts.js" changed to <script src="scripts/12ca1a3d.scripts.js"'
echo "TEST FINISHED"
sebv commented 10 years ago

... Narrowed it down to '<'

Applying the method below on the data fixes it, but the correct fix is probably up the line.

var encodeHtml = function (s) {
    return s.replace(/&/g, '&amp;')
               .replace(/</g, '&lt;')
               .replace(/>/g, '&gt;')
               .replace(/"/g, '&quot;');
  };
sebv commented 10 years ago

The problem comes from the ng-bind-html-unsafe in the browser, the < destroy the page structure and the js scripts go wild. Should use angular-sanitise + ng-bind-html instead.

sebv commented 10 years ago

Closing, moved issue to main project.

jaredly commented 10 years ago

dup of https://github.com/Strider-CD/strider/issues/166