- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用带有 GTK 工具包的 emacs 23.2。我使用以下配置参数从源代码构建了 emacs:
./configure --prefix=/usr --without-makeinfo --without-sound
使用以下配置构建 emacs:
Where should the build process find the source code? /home/****/incoming/emacs-23.2 What operating system and machine description files should Emacs use? `s/gnu-linux.h' and `m/intel386.h' What compiler should emacs be built with? gcc -g -O2 -Wdeclaration-after-statement -Wno-pointer-sign Should Emacs use the GNU version of malloc? yes (Using Doug Lea's new malloc from the GNU C Library.) Should Emacs use a relocating allocator for buffers? yes Should Emacs use mmap(2) for buffer allocation? no What window system should Emacs use? x11 What toolkit should Emacs use? GTK Where do we find X Windows header files? Standard dirs Where do we find X Windows libraries? Standard dirs Does Emacs use -lXaw3d? no Does Emacs use -lXpm? yes Does Emacs use -ljpeg? yes Does Emacs use -ltiff? yes Does Emacs use a gif library? yes -lgif Does Emacs use -lpng? yes Does Emacs use -lrsvg-2? no Does Emacs use -lgpm? yes Does Emacs use -ldbus? yes Does Emacs use -lgconf? no Does Emacs use -lfreetype? yes Does Emacs use -lm17n-flt? no Does Emacs use -lotf? yes Does Emacs use -lxft? yes Does Emacs use toolkit scroll bars? yes
我的操作系统是OpenSuSE 11.1,GTK版本是2.14.4。当我在普通大小(大约 1000 行)的文件中滚动时按住向上/向下键,emacs 几乎挂起并产生大约 50% 的 CPU 负载。我使用以下插件:
用 -q
启动 emacs 解决了这个问题,但是我没有任何插件。我无法弄清楚,我的 .emacs
的哪一部分是造成这种行为的原因。这是我的 .emacs
文件的摘录:
(require 'ido)(ido-mode 1)(require 'linum)(global-linum-mode 1)(require 'tabbar)(tabbar-mode 1)(tabbar-local-mode 0)(tabbar-mwheel-mode 0)(setq tabbar-buffer-groups-function (lambda () (list "All")))(global-set-key [M-left] 'tabbar-backward)(global-set-key [M-right] 'tabbar-forward);; hide the toolbar (gtk etc.)(tool-bar-mode -1);; Mouse scrolling enhancements(setq mouse-wheel-progressive-speed nil)(setq mouse-wheel-scroll-amount '(5 ((shift) . 5) ((control) . nil)));; Smart-HOME(defun smart-beginning-of-line () "Forces the cursor to jump to the first none whitespace char of the current line when pressing HOME" (interactive) (let ((oldpos (point))) (back-to-indentation) (and (= oldpos (point)) (beginning-of-line))))(put 'smart-beginning-of-line 'CUA 'move)(global-set-key [home] 'smart-beginning-of-line)(custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(column-number-mode t) '(cua-mode t nil (cua-base)) '(custom-buffer-indent 4) '(delete-selection-mode nil) '(display-time-24hr-format t) '(display-time-day-and-date 1) '(display-time-mode t) '(global-font-lock-mode t nil (font-lock)) '(inhibit-startup-buffer-menu t) '(inhibit-startup-screen t) '(pc-select-meta-moves-sexps t) '(pc-select-selection-keys-only t) '(pc-selection-mode t nil (pc-select)) '(scroll-bar-mode (quote right)) '(show-paren-mode t) '(standard-indent 4) '(uniquify-buffer-name-style (quote forward) nil (uniquify)))(setq-default tab-width 4)(setq-default indent-tabs-mode t)(setq c-basic-offset 4);; Highlighting of the current line(global-hl-line-mode 1)(set-face-background 'hl-line "#E8F2FE")(defalias 'yes-or-no-p 'y-or-n-p)(display-time)(set-language-environment "Latin-1");; Change cursor color according to mode(setq djcb-read-only-color "gray");; valid values are t, nil, box, hollow, bar, (bar . WIDTH), hbar,;; (hbar. HEIGHT); see the docs for set-cursor-type(setq djcb-read-only-cursor-type 'hbar)(setq djcb-overwrite-color "red")(setq djcb-overwrite-cursor-type 'box)(setq djcb-normal-color "black")(setq djcb-normal-cursor-type 'bar)(defun djcb-set-cursor-according-to-mode () "change cursor color and type according to some minor modes." (cond (buffer-read-only (set-cursor-color djcb-read-only-color) (setq cursor-type djcb-read-only-cursor-type)) (overwrite-mode (set-cursor-color djcb-overwrite-color) (setq cursor-type djcb-overwrite-cursor-type)) (t (set-cursor-color djcb-normal-color) (setq cursor-type djcb-normal-cursor-type))))(add-hook 'post-command-hook 'djcb-set-cursor-according-to-mode)(define-key global-map '[C-right] 'forward-sexp)(define-key global-map '[C-left] 'backward-sexp)(define-key global-map '[s-left] 'windmove-left)(define-key global-map '[s-right] 'windmove-right)(define-key global-map '[s-up] 'windmove-up)(define-key global-map '[s-down] 'windmove-down)(define-key global-map '[S-down-mouse-1] 'mouse-stay-and-copy)(define-key global-map '[C-M-S-down-mouse-1] 'mouse-stay-and-swap)(define-key global-map '[S-mouse-2] 'mouse-yank-and-kill)(define-key global-map '[C-S-down-mouse-1] 'mouse-stay-and-kill)(define-key global-map "\C-a" 'mark-whole-buffer)(custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(default ((t (:inherit nil :stipple nil :background "#f7f9fa" :foreground "#191919" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "unknown" :family "DejaVu Sans Mono")))) '(font-lock-builtin-face ((((class color) (min-colors 88) (background light)) (:foreground "#642880" :weight bold)))) '(font-lock-comment-face ((((class color) (min-colors 88) (background light)) (:foreground "#3f7f5f")))) '(font-lock-constant-face ((((class color) (min-colors 88) (background light)) (:weight bold)))) '(font-lock-doc-face ((t (:inherit font-lock-string-face :foreground "#3f7f5f")))) '(font-lock-function-name-face ((((class color) (min-colors 88) (background light)) (:foreground "Black" :weight bold)))) '(font-lock-keyword-face ((((class color) (min-colors 88) (background light)) (:foreground "#7f0055" :weight bold)))) '(font-lock-preprocessor-face ((t (:inherit font-lock-builtin-face :foreground "#7f0055" :weight bold)))) '(font-lock-string-face ((((class color) (min-colors 88) (background light)) (:foreground "#0000c0")))) '(font-lock-type-face ((((class color) (min-colors 88) (background light)) (:foreground "#7f0055" :weight bold)))) '(font-lock-variable-name-face ((((class color) (min-colors 88) (background light)) (:foreground "Black")))) '(minibuffer-prompt ((t (:foreground "medium blue")))) '(mode-line ((t (:background "#222222" :foreground "White")))) '(tabbar-button ((t (:inherit tabbar-default :foreground "dark red")))) '(tabbar-button-highlight ((t (:inherit tabbar-default :background "white" :box (:line-width 2 :color "white"))))) '(tabbar-default ((t (:background "gray90" :foreground "gray50" :box (:line-width 3 :color "gray90") :height 100)))) '(tabbar-highlight ((t (:underline t)))) '(tabbar-selected ((t (:inherit tabbar-default :foreground "blue" :weight bold)))) '(tabbar-separator ((t nil))) '(tabbar-unselected ((t (:inherit tabbar-default)))))
有什么建议吗?亲切的问候,美菲克斯
最佳答案
我觉得不错。它在 emacs -q 下运行正常这一事实是关键,因为这意味着您可以解决问题。
现在,我希望有人根据您的文件为您提供简单的诊断,但如果没有(嘿,已经 7 个小时了),您可以随时尝试标准的 .emacs-debugging slow coach。这不是特别有趣,但它会起作用。
选择你喜欢的方式:
(A) 分而治之
将您的 .emacs 在心里划分为 4 个部分。现在,通过制作四个单独的试用版 emacs 配置找出导致问题的四分之一:第一个使用 1/4 的 emacs,下一个使用一半,下一个使用四分之三,最后一个使用所有内容。
emacs --no-site-file # see if the problem is in your site-wide emacs init
emacs -q -l config1 # is it in the first quarter
emacs -q -l config2 # is it in the first half (i.e. the second quarter)
emacs -q -l config3 # is it in the third quarter
emads -q -l config4 # gotta be here, but test again to be sure
如果没有找到罪魁祸首,可以进一步划分。如果你怀疑你有罪魁祸首,或者只是更喜欢这种方法的外观,试试这个:
(B) 检查每一步
使用 emacs -q
加载一个空白的 emacs
在缓冲区中访问您的 .emacs
在另一个缓冲区中访问您的 1K 行文件。
使用 eval-last-sexp C-x C-e 或 eval-region 尝试您的 .emacs 中的每个部分或行,从头开始系统地尝试,或者从任何可疑的函数调用开始。
慢慢地,但肯定地,你会把它熏出来。抱歉,我无法为您提供即时诊断。
关于emacs - 使用 GTK 在 emacs 23.2 中滚动滞后,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2955592/
我有一个简单的应用程序,它读取数据库,然后经过一些操作将结果写入另一个数据库。 第一行代码使用给用户的消息和屏幕日志更新 ui,然后全部包装在带有 using 和其他 try/catch 的 try/
我有一个名为activity的表,其中有一个memberId和一个时间戳。我想找出在给定的月份中有多少成员执行了一项 Activity (即-在 Activity 表中有记录),但在过去12个月中,谁
我有前三列数据。第一个列表示 id 在前一天做了某件事。我试图通过添加一个新变量“new”来从 dat 转到 dat2,该变量执行三件事: 将 yest 的值复制到前一天。但日子并不总是连续的。因此,
我有一个简单的应用程序,它读取数据库,然后经过一些操作将结果写入另一个数据库。 第一行代码使用给用户的消息和屏幕日志更新 ui,然后全部包装在带有 using 和其他 try/catch 的 try/
我有 data.frame,它显示了股票的当前出价和要价以及我当时的信号。 time bid_price ask_price signal 10:10:01.000500
我无法让网站正常运行。它有许多移动背景并使用 css-invert 过滤器。 请看这里: http://epicstudios.de/blackwhite/ 我的问题是,即使是普通计算机也无法处理移动
我创建了一个矩形对象网格并将它们添加到一个 Pane 中。每个矩形都有一个连接到它的鼠标事件监听器,它由 MouseEvent.Entered 触发器触发。当用户将鼠标移到矩形上时,处理程序只是更改矩
感觉我的笔记本电脑不允许控制台应用程序以一定的速度运行,因为我也尝试过其他应用程序,并且它们也随机滞后。我的机器不老,也不应该这样做,它具有i7-4720HQ CPU @ 2.60GHz(8 CPUs
我现在正面临这个问题。当我的页面加载 (DOM) 时,我调用一个返回 1880 张图像的函数,这些图像存储在 Steam 服务器中。 这些图像在回调之后被添加到我的 DOM 中,该回调返回我的数组响应
我正在尝试创建一个每两秒执行一次函数的应用程序。为了实现这一点,我使用 Timer.scheduledTimer 函数。问题是该函数没有按照应有的那样每两秒执行一次。通常应用程序开始时的间隔是 2 秒
我得到了这个 gps 接收器方法,它将一些数据存储到数据库中。 // GPS private void addGPSListener() { globalconstant.db
我有一个 UISwitch,它可以在切换值时更改其上方 UILabel 的文本。每隔一段时间(大约 2% 的时间)文本不会改变。标签的文本被保存到文本文件中,因此我需要准确性。由于这个问题是间歇性的,
我有一个包含用户帖子的表格 View 。每个帖子都有图片、用户名和帖子本身。刷新控件的操作是使用来自 Parse 的数据重新加载表。除了拉动刷新时的极度延迟外,一切都完美无缺。不知道是因为每个单元格里
我有一个“详细信息”页面,其中显示俱乐部的信息。该页面是一个 UIViewController,由按钮和标签组成,以实现这种外观(就像分组的小表格)。当我在设备上加载此页面时,它比我的应用程序中的任何
我有 ActionSheet 的代码,它可以连接的东西有点慢? @IBAction func showAction(_ sender: UIButton) { let actionSheetC
我的桌面应用程序滞后。我认为 java.awt.image.BufferStrategy 中有问题。 private void render() { BufferStrategy bs
你好,我有一个包含多个页面的 viewpager(使用 fragment 状态寻呼机),以及一些 png 作为这些页面的背景。我已经遵循了在 Ui 中显示位图 (http://developer.an
我在 WPF 窗体上有一个 richtextbox 控件。它有 SpellChecking.IsEnabled 设置为 true 并且 VerticalScrollBarVisibility 设置为
在我的 android 应用程序中,我将数据存储在本地 SQLite 数据库中。在这个数据库的大小小于 8-9 MB 之前,一切都很顺利;然而,一旦数据库大小约为 9 MB,它就会继续在 logcat
我正在开发一个简单的 Android 应用程序,它只有一个 Activity ,一个 WebView。它在我的手机(Android 7.1.2 Nougat 版本)上运行良好,但我收到许多用户的投诉,
我是一名优秀的程序员,十分优秀!