Skip to content
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

LiveScript compiler takes forever to parse a file ending with a comment containing many # #279

Closed
robotlolita opened this issue Feb 16, 2013 · 2 comments

Comments

@robotlolita
Copy link
Contributor

$ lsc --version
LiveScript 1.1.1

So, I'm not sure if the issue is with the parsing, although it's the most likely conclusion, the case is that the parsing time seems to increase a lot depending on the number of # you have at the end of your file.

The interactive prompt below shows the progression in parsing/compilation time from 25 single-line comment characters up to 28 of them:

$ printf "#########################" > test.ls
$ time lsc -cbp test.ls

real    0m0.796s
user    0m0.788s
sys 0m0.008s

$ printf "##########################" > test.ls
$ time lsc -cbp test.ls

real    0m1.483s
user    0m1.476s
sys 0m0.012s

$ printf "###########################" > test.ls
$ time lsc -cbp test.ls

real    0m2.836s
user    0m2.836s
sys 0m0.016s

$ printf "############################" > test.ls
$ time lsc -cbp test.ls

real    0m5.573s
user    0m5.580s
sys 0m0.020s

However, if the comment isn't the last line in the file, the parsing time is fine:

$ printf "############################\n" > test.ls
$ time lsc -cbp test.ls

real    0m0.116s
user    0m0.096s
sys 0m0.016s
@vendethiel
Copy link
Contributor

(actually a coco issue)

@czhou
Copy link

czhou commented Feb 16, 2013

I am out of the office until 02/19/2013.

Note: This is an automated response to your message "[LiveScript]
LiveScript compiler takes forever to parse a file ending with a comment
containing many # (#279)" sent on 02/16/2013 23:02:39.

This is the only notification you will receive while this person is away.

satyr added a commit to satyr/coco that referenced this issue Feb 17, 2013
@gkz gkz closed this as completed Jul 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants