-
-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test output colors not applied if output is too long #999
Comments
That is by design as performance suffers greatly when trying to parse ANSI coloring in long outputs |
Any way we could parse out the extra characters introduced once that limit is reached so that readability doesn't suffer? |
@oliversalzburg thanks for the answer, could you let me know what the limit is? @knownasilya the optimal behavior would actually be:
return ainsi2html(string)
return ainsi2html(string.slice(0, limit)) + stripcolorcodes(string.slice(limit)) |
For reference https://github.com/Strider-CD/strider/blob/master/client/ansi/filters/ansi.js#L8 As the output is streamed to the client, the rendering is performed on the client side. As long as performance is not negatively impacted, I would accept any change in this area :) |
Sorry for the few words, but I was on the road. I originally implemented this "fix" because there were major performance issues in this area. For some builds it was nearly impossible to be even able to open them without the browser freezing/crashing. I admit that the fix is horrible, but it does actually fix the issue without creating a new issue that could appear when trying to remove control codes or rendering them another way. If someone would be able to provide a better fix for this, I would be very happy. Being able to control this behavior would also be nice, then people could decide on their own what's best for them. This could be a nice change that takes not too much effort. |
@oliversalzburg If you reopen the bug, we'd be happy to contribute a PR 😉 |
The PR would go into a separate ticket anyway, but, sure :) |
We are using Strider v1.9.4
When the output of our tests is too long (2107 lines) the coloring stops working:
![screen shot 2016-10-07 at 11 25 47](https://cloud.githubusercontent.com/assets/605880/19186043/9c09b0ce-8c84-11e6-9b24-6d79b96a588a.png)
When the output is shorter (~100 lines) the coloring works great (same output but stops before because of test failure):
![screen shot 2016-10-07 at 11 28 45](https://cloud.githubusercontent.com/assets/605880/19186034/9322b438-8c84-11e6-8c12-e77b6903aba3.png)
The text was updated successfully, but these errors were encountered: