Open henryruhs opened 6 years ago
Thanks for reporting, I'll investigate this over the next days
Did the first steps to debug this, seems like load-asciicast
enters an infinite loop for your asciicast. Will investigate further...
Great, it felt like a infinite loop :-) Looking forward to a fix, thank you man.
Did a quick dirty test setup in svg-term
// svg-term/index.tsx#L81
console.log('load');
const cast = load(json, options.width, typeof options.height === 'number' ? options.height + 1 : undefined);
console.log('load', process.hrtime(start));
logs load
and then freezes the process.
Looks like it happens with the all new casts :-(
UPD: it's not true, not all casts affected
@bunopus That’s not what I experience in daily usage. Could you provide the version of your asciinema cli and links to affected uploaded casts?
@marionebl it's very strange
asciinema --version asciinema 1.4.0
I have two casts with almost the same content, but one is working, second - not. https://asciinema.org/a/eUnQPgWgKFVl4WUqinKbX7Qze - not working, svg-term-cli freezes https://asciinema.org/a/D3qhyP1ORhqwL3yllRnnzHIbN - almost the same content - working
🤔
Spent some more time on this. load-asciicast
indeed does not enter an infinite loop, it just gets very very slow for certain casts:
cast | width | height | size | render time |
---|---|---|---|---|
156787 | 208 | 58 | 29K | 145s |
156838 | 112 | 32 | 28K | 13s |
156579 | 155 | 43 | 59K | > 300s |
What jumped at me is the big dimensions. Forcing down the screen buffer size leads to notable speed increases:
cast | width | height | size | render time |
---|---|---|---|---|
156787 | 80 | 25 | 29K | 5s |
156838 | 80 | 25 | 28K | 5s |
156579 | 80 | 25 | 59K | 11s |
I'll create an issue with asciinema about this. For the time being you can force the screen buffer down via svg-term-cli
:
svg-term --cast eUnQPgWgKFVl4WUqinKbX7Qze --out 156787.svg --width=80 --height=25
svg-term --cast znqFxSzM9CmIJINrmn2IzPX5g --out 156579.svg --width=120 --height=25
Hello,
svg-term works perfect on my machine with the given
113643
example cast.There seems to be an issue with new formats. I had to download my new cast in the
version 1
syntax assvg-term
told me that onlyversion 1
andversion 2
syntax are supported.Watch cast: https://asciinema.org/a/znqFxSzM9CmIJINrmn2IzPX5g Download JSON: https://asciinema.org/a/znqFxSzM9CmIJINrmn2IzPX5g.cast?dl=true
Setup
svg-term: 2.0.3 NodeJS: 8.7.0 NPM: 5.6.0 OS: Ubuntu 17.04
Command
Issue
The terminal and sometimes my whole machine is freezing - there is no way to cancle it using
CTRL+C
. No output is being processed.