Re[1]: [cedet-semantic] Updating tag table slow on large Java file
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2004-10-14 11:03:55
|
Hi, Sorry for a late reply. You can probably add a hook to `semantic--before-fetch-tags-hook' to solve this problem. In your hook function, you could decide if you really want the file parsed or not, then return nil or t. for example (add-hook 'semantic--before-fetch-tags-hook (lambda () (if (> (point-max) 50000) nil t))) for just a brute form. You could get more elegant by asking if the tag cache is non-nil, so it parses at user requested flush time like this: (add-hook 'semantic--before-fetch-tags-hook (lambda () (if (and (> (point-max) 50000) (not (semantic-parse-tree-needs-rebuild-p))) nil t))) If you settle on something you like, I can add it to semantic as an option. Eric >>> "David Ishee" <o5l...@sn...> seems to think that: >I have a very large Java source file that I sometimes have to work >with. Everytime the message "Update Tag Table" appears in the >minibuffer, it takes 5-10 seconds to complete and causes XEmacs to >completely freeze for the duration of its operation. > > > >I found this message in semantic-edit.el in this section of code in >the function semantic-edits-incremental-parser: > > > >;;;; One token was updated. > > ((and (= (length tokens) 1) (= (length newf-tokens) 1)) > > ;; One old token was modified, and it is replaced by > > ;; One newfound token. Splice the new token into the > > ;; position of the old token. > > ;; Do the splice. > > (semantic-edits-splice-replace (car tokens) (car newf-tokens)) > > ;; Add this token to our list of changed toksns > > (setq changed-tokens (cons (car tokens) changed-tokens)) > > ;; Debug > > (message "Update Tag Table: %s" > > (semantic-format-tag-name (car tokens) nil t)) > > ;; Flush change regardless of above if statement. > > ) > > > > > >Is there any way I can control how often the tag table gets updated? >Is there any way this function can be optimized? > > > >This Java file has about 15500 lines in it. This is the only monster >Java file I have to work with where this issue is a problem. > > > >(Please no flames on file size) > > > >Any other ideas for workarounds? > > > >Thanks, > >David > > >------------------------------------------------------- >This SF.Net email is sponsored by BEA Weblogic Workshop >FREE Java Enterprise J2EE developer tools! >Get your free copy of BEA WebLogic Workshop 8.1 today. >http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click >_______________________________________________ >cedet-semantic mailing list >ced...@li... >https://lists.sourceforge.net/lists/listinfo/cedet-semantic > -- Eric Ludlam: za...@gn..., er...@si... Home: http://www.ludlam.net Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |