2

Performance used to be OK, but a couple of weeks ago the performance got much worse. Some experimentation showed that it's auto-complete-mode in XML files.

When I type, it now takes a second or two for each character to appear.

This is a profiler report that covers me typing three or four words:

+ timer-event-handler                                            1636  90%
+ ...                                                             115   6%
+ command-execute                                                  34   1%
+ ac-handle-post-command                                           25   1%
+ redisplay_internal (C function)                                   2   0%
+ key-chord-input-method                                            1   0%

I have no idea what to do with it though.

If I turn off auto-complete-mode the problem instantly goes away.

Ideas, anybody?

Thanks.

  • What are the timer events calling? They are likely auto-complete gathering candidates which may have a pathological interaction with nxml-mode. – stsquad Feb 6 '15 at 12:47
  • how do i find out what they are calling? there seems to be no expansion of anything... this is the first time i have ever seen the profiler... be gentle... – jack Feb 6 '15 at 14:43
  • I would look at the variable ac-sources. You could remove each source one by one (or bisect it) until you find the culprit. – nanny Feb 6 '15 at 16:12
  • @jack: hit return on line to expand it. – stsquad Feb 6 '15 at 16:33
1

When I expand the entries that are using the most CPU I get:

- timer-event-handler                                            3805  89%
 - byte-code                                                     3805  89%
  - apply                                                        3805  89%
   - ac-update-greedy                                            2717  64%
    - ac-update                                                  2713  64%
     - ac-menu-create                                            2711  64%
      - popup-create                                             2710  63%
         end-of-visual-line                                       245   5%
         beginning-of-visual-line                                 243   5%
         popup-vertical-motion                                    148   3%
       + posn-at-point                                             75   1%
         posn-col-row                                               2   0%
     + ac-remove-quick-help                                         1   0%
     + ac-update-candidates                                         1   0%
    + ac-start                                                      4   0%
   - ac-show-menu                                                1051  24%
    - ac-update                                                  1051  24%
     - ac-menu-create                                            1051  24%
      - popup-create                                             1051  24%
         end-of-visual-line                                        93   2%
         beginning-of-visual-line                                  92   2%
         popup-vertical-motion                                     53   1%

The value of ac-sources is: (ac-source-nxml-tag ac-source-nxml-attr ac-source-nxml-attr-value ac-source-nxml-css ac-source-nxml-css-property ac-source-nxml-tag-value-by-nxml ac-source-nxml-tag-value-by-myself).

I tried changing it:

(setq ac-sources '(ac-source-symbols ac-source-words-in-same-mode-buffers))

... and that has improved the performance a lot!

I also removed the auto-complete-nxml package and everything is working fine.

I'll try to find out more about auto-complete-nxml, because that has been working fine for months; I don't know what's gone wrong there.

Anyway, my problem is fixed. Many thanks everybody.

  • 1
    I think it's good if you set your answer as the accepted answer, so the question isn't registered as unanswered. – Meaningful Username Feb 7 '15 at 19:45
  • thanks, i will mark it as answered. after a long time searching help and trying 3 different browsers, i have discovered that i have to wait 48 hours before i can accept my own answer. my apologies for the noise. jack – user5431 Feb 7 '15 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.