Indent very slow

Đang mở
#606 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
clojure, emacs-lisp
Lĩnh vực
performance, tooling

Hướng nghiên cứu

Bắt đầu bằng cách lập hồ sơ hiệu năng của việc thụt lề khoảng 1.000 dòng với clojure-use-backtracking-indent được bật, sau đó so sánh với thiết lập nil được mô tả trong báo cáo. Điều tra điểm vào của việc thụt lề trong clojure-mode và xác nhận rằng bản sửa lỗi giúp quá trình tái hiện này hoàn tất trong chưa đầy một giây mà không làm mất hành vi nhạy theo ngữ cảnh như mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

help wanted indentation

Use the template below when reporting bugs. Please, make sure that
you're running the latest stable clojure-mode and that the problem you're reporting
hasn't been reported (and potentially fixed) already.

Please, remove all of the placeholder text (the one in italics) in your final report!

Expected behavior

Fast

Actual behavior

Slow

Steps to reproduce the problem

Indent about a 1000 lines with little nesting.

After using the profiler, I determined that I can set clojure-use-backtracking-indent to nil and get a nice speedup of about 90%. I don't know what it does ("When non-nil, enable context sensitive indentation."??) - Still its too slow and takes more than a second. My machine is not the fastest, but 2 Ghz should suffice to indent a few pages of text in less than a second in a text editor.

This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.

Environment & Version information

clojure-mode version

5.13.0
Include here the version string displayed by M-x clojure-mode-display-version. Here's an example:

clojure-mode (version 5.2.0)
Emacs version

E.g. 24.5 (use C-h C-a to see it)
26.3

Operating system

E.g. Windows 10

Ngôn ngữ chính
Emacs Lisp
Star
1k
Fork
249
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của clojure-emacs/clojure-mode

Tất cả issue của clojure-emacs/clojure-mode

Issue tương tự

Thêm issue về Performance

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.