jmcnamara / xlsxwriter.lua

A lua module for creating Excel XLSX files.
http://xlsxwriterlua.readthedocs.org/
MIT License
142 stars 52 forks source link

Escape string in lua way :) It would be better. #7

Closed cloudwu closed 9 years ago

jmcnamara commented 9 years ago

Hi 云风,

Thank you for that. It looks good (with the fix). :-)

Could you check that it doesn't make the module slower. It probably shouldn't since the number of function calls is reduced, but it is best to check.

Also, why the sudden interest from Lua programmers in China? There have been a lot of Chinese forks and stars in the last 24 hours.

John

cloudwu commented 9 years ago

I guess it would be faster because less function calls (scan the string only once), and less temp strings.

jmcnamara commented 9 years ago

I guess it would be faster because less function calls (scan the string only once), and less temp strings.

That would be my guess too. :-)

But we won't know unless we run a test. If you can do it and show that your change is the same or faster then I can merge the it straight away. Otherwise it will have to wait until I have some time to test it.

Run a test with 20,000+ different string cells and so see how long it takes before and after the patch.

Regards,

John

cloudwu commented 9 years ago

https://gist.github.com/cloudwu/282e9e95e295c50c2159

A simple test

jmcnamara commented 9 years ago

That is perfect. Thank you.

jmcnamara commented 9 years ago

P.S. Do you know why there has been a lot of recent interest in xlsxwriter.lua from Chinese coders on GitHub? Did you see it mentioned in a Chinese blog post of something?

cloudwu commented 9 years ago

I found this project by google. and my project named skynet (in github) has many chinese users.