chrisbra / Colorizer

color hex codes and color names
547 stars 30 forks source link

slow when dealing with big file #35

Closed lirenlin closed 10 years ago

lirenlin commented 10 years ago

Hi,

First of all, thank you for this plugin. However, I found it very slow(really) while processing a relatively large file, say 19000 line. I cannot wait until it finishes.

Could you please verify and solve this?

chrisbra commented 10 years ago

Can you provide a sample file?

lirenlin commented 10 years ago

https://dl.dropboxusercontent.com/u/38795372/pipeview.out

chrisbra commented 10 years ago

Hi Li!

On Do, 24 Jul 2014, Li Renlin wrote:

https://dl.dropboxusercontent.com/u/38795372/pipeview.out

You want to edit such a huge script in Vim? It looks like Colorizer is not parsing the color codes correctly but even using the vimcat script takes a whole lot of time to parse that output.

Best,

Christian

Das wahrhaft größte Geschenk ist es, wenn man sein eigenes Herz verschenken will. -- Benjamin Stramke

lirenlin commented 10 years ago

Yes, it's huge. It's generate by another software. it's Okay to view it using "less -r pipeview.out", very fast and it shows the correct color. I just need more navigation control, so I tried it with vim, but it seems not a good idea. Should I close it?

chrisbra commented 10 years ago

Do you need the color output? If not, I would simply use sed 's/\x1B\[[0-9;]*[JKmsu]\|^O//g' pipeview.out > pipeview2.txt to remove all ansi codes.

lirenlin commented 10 years ago

Thank you for the hint. I will give it a try. Color is good to make it easier to visualize the content, but not really necessary.