Sarcasm / flycheck-irony

C, C++ and Objective-C support for Flycheck, using Irony Mode
56 stars 10 forks source link

why editing code response very slow while enable flycheck-mode? #21

Open chenpoyang opened 6 years ago

chenpoyang commented 6 years ago

i am using irony, company, company-irony for auto-complete. why editing code, it response very slow(3892 lines code). it fixed when i disable flycheck-mode. but the flycheck-irony features is good, and i don't want to disable flycheck. i don't know how to fix it? here is my configuration:

irony-mode:

;; irony-mode
(require 'irony)

(defun my-irony-mode-on ()
  ;; avoid enabling irony-mode in modes that inherits c-mode, e.g: php-mode
  (when (member major-mode irony-supported-major-modes)
    (irony-mode 1)))

(add-hook 'c++-mode-hook 'my-irony-mode-on)
(add-hook 'c-mode-hook 'my-irony-mode-on)
(add-hook 'objc-mode-hook 'my-irony-mode-on)

(defun my-irony-mode-hook ()
  (define-key irony-mode-map [remap completion-at-point]
    'irony-completion-at-point-async)
  (define-key irony-mode-map [remap complete-symbol]
    'irony-completion-at-point-async))

(add-hook 'irony-mode-hook 'my-irony-mode-hook)

(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)

company mode:

;; company-mode
(require 'company)

;;(add-hook 'after-init-hook 'global-company-mode)
;;(setq company-global-modes '(not php-mode))
;;(setq company-global-modes '(not html-mode))
(global-company-mode 1)

(add-hook 'irony-mode-hook 'company-irony-setup-begin-commands)
(setq company-backends (delete 'company-semantic company-backends))

;; enable tab-completion with no delay
(setq company-idle-delay 0)
;;(define-key c-mode-map [(tab)] 'company-complete)
;;(define-key c++-mode-map [(tab)] 'company-complete)

company-irony:

(eval-after-load 'company
  '(add-to-list 'company-backends 'company-irony))

flycheck, and flycheck-irony:

;; flycheck
(require 'flycheck)
(require 'flycheck-irony)
(add-hook 'after-init-hook #'global-flycheck-mode)
(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))

(eval-after-load 'flycheck
  '(add-hook 'flycheck-mode-hook #'flycheck-irony-setup))
chenpoyang commented 6 years ago

i remove the project and checkout again , and it works, but still don't know how to reproduce.

chenpoyang commented 6 years ago

still response very slow in big project, is the warnning and error to much in project?

nayefc commented 6 years ago

Same here.. any resolutions?