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

Colorizer makes loading files really slow #30

mauromorales opened this issue Apr 5, 2016 · 0 comments


Copy link

@mauromorales mauromorales commented Apr 5, 2016

I was trying colorizer with a file that was ~58K lines long and it was taking more than 15 seconds to load. Looking into Vim profiler it seems that most of the time was spent on the function PreviewColorInLine()

FUNCTION  <SNR>24_PreviewColorInLine()                                                                                                                                                        
Called 58187 times                                                                                                                                                                            
Total time:  14.430544                                                                                                                                                                        
 Self time:   2.961442                                                                                                                                                                        

count  total (s)   self (s)                                                                                                                                                                   
58187              0.137628   let line = getline(a:where)                                                                                                                                     
232748              0.306366   for Func in s:ColorFinder                                                                                                                                      
174561  12.106593   0.637491     let ret = Func(line, a:where)                                                                                                                                
                                " returned a list of a list: color as #rrggbb, text pattern to highlight                                                                                      
174561              0.206301     for r in ret                                                                                                                                                 
                                  call s:SetMatcher(r[0], r[1])                                                                                                                               
174561              0.162987   endfor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.