From b9517ade8c5b556a6aa3d35c256e61e37085d9d8 Mon Sep 17 00:00:00 2001 From: Alexey Balchunas Date: Sun, 6 Sep 2015 10:53:44 +0700 Subject: [PATCH] Do not use tags for callstack, only for current location. Otherwise, it's unusably slow. --- autoload/vebugger/jdb.vim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/autoload/vebugger/jdb.vim b/autoload/vebugger/jdb.vim index 432f7dd..a2c9ed2 100644 --- a/autoload/vebugger/jdb.vim +++ b/autoload/vebugger/jdb.vim @@ -68,7 +68,7 @@ function! s:getTagContainingString(tag, str) return {} endfunction -function! s:findFolderFromStackTrace(src,nameFromStackTrace) +function! s:findFolderFromStackTrace(src,nameFromStackTrace,frameNumber) " Remove method name. let l:canonicalClassName = strpart(a:nameFromStackTrace, 0, strridx(a:nameFromStackTrace, ".")) " Remove package name. @@ -76,7 +76,9 @@ function! s:findFolderFromStackTrace(src,nameFromStackTrace) " Remove class name. let l:package = strridx(l:canonicalClassName, ".") >= 0 ? strpart(l:canonicalClassName, 0, strridx(l:canonicalClassName, ".")) : "" - if exists('g:vebugger_use_tags') && g:vebugger_use_tags + " We don't really use callstack, so we use tags only for the current location. + " Otherwise it makes everything too slow. + if exists('g:vebugger_use_tags') && g:vebugger_use_tags && a:frameNumber == 1 " Now first try to find a tag for the class from the required package. let l:classTag = s:getTagContainingString(l:simpleClassName, l:package) if (has_key(l:classTag, "filename")) @@ -100,9 +102,9 @@ function! vebugger#jdb#_readWhere(pipeName,line,readResult,debugger) if 'out'==a:pipeName let l:matches=matchlist(a:line,'\v\s*\[(\d+)]\s*(\S+)\s*\(([^:]*):(\d*)\)') if 4