[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phpinspect db3ec3b67d 124/126: Add custom variables for
From: |
ELPA Syncer |
Subject: |
[elpa] externals/phpinspect db3ec3b67d 124/126: Add custom variables for worker and pipeline pause time |
Date: |
Sat, 12 Aug 2023 00:58:54 -0400 (EDT) |
branch: externals/phpinspect
commit db3ec3b67d617a650c3a7479d018564c354c5d6a
Author: Hugo Thunnissen <devel@hugot.nl>
Commit: Hugo Thunnissen <devel@hugot.nl>
Add custom variables for worker and pipeline pause time
---
phpinspect-pipeline.el | 15 +++++++++++++--
phpinspect-worker.el | 10 +++++++++-
phpinspect.el | 2 ++
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/phpinspect-pipeline.el b/phpinspect-pipeline.el
index 021a730feb..3c3069d1f0 100644
--- a/phpinspect-pipeline.el
+++ b/phpinspect-pipeline.el
@@ -28,9 +28,20 @@
(define-error 'phpinspect-pipeline-incoming "Signal for incoming pipeline
data")
(define-error 'phpinspect-pipeline-error "Signal for pipeline errors")
-(defvar phpinspect-pipeline-pause-time 0.5
+(defcustom phpinspect-pipeline-pause-time 0.5
"Number of seconds to pause a pipeline thread when emacs receives
-user input.")
+user input. This is similar to `phpinspect-worker-pause-time',
+but pipelines are meant to run in bursts. For that reason, the
+default pause time for pipelines is lower to be a little more
+aggressive in hogging cpu time.
+
+Set this variable to a higher value if you experience a lot of
+jitter when editing during pipeline operations. At the time of
+writing, pipelines are used to refresh the project
+index/autoloader and for the indexation of \"include\"
+directories."
+ :type 'number
+ :group 'phpinspect)
(cl-defstruct (phpinspect-pipeline-end (:constructor
phpinspect-make-pipeline-end))
(value nil
diff --git a/phpinspect-worker.el b/phpinspect-worker.el
index 70ec5c2fbe..a7cc7f0299 100644
--- a/phpinspect-worker.el
+++ b/phpinspect-worker.el
@@ -31,6 +31,14 @@
(require 'phpinspect-queue)
(require 'phpinspect-pipeline)
+(defcustom phpinspect-worker-pause-time 1
+ "Number of seconds that `phpinspect-worker' should pause when
+user input is detected. A higher value means better
+responsiveness, at the cost of slower code indexation. On modern
+hardware this probably doesn't need to be tweaked."
+ :type 'number
+ :group 'phpinspect)
+
(defvar phpinspect-worker nil
"Contains the phpinspect worker that is used by all projects.")
@@ -142,7 +150,7 @@ already present in the queue."
;; interrupt the thread.
(unless (or (not (input-pending-p))
(phpinspect-worker-skip-next-pause worker))
- (phpinspect-thread-pause 1 mx continue))
+ (phpinspect-thread-pause phpinspect-worker-pauseo-time mx
continue))
(setf (phpinspect-worker-skip-next-pause worker) nil)))
(t (message "Phpinspect worker thread errored :%s" err))))
(phpinspect--log "Worker thread exiting")
diff --git a/phpinspect.el b/phpinspect.el
index 349c7c8d38..e42f92c3e4 100644
--- a/phpinspect.el
+++ b/phpinspect.el
@@ -142,6 +142,8 @@ Reparses the entire buffer without token reuse."
"A minor mode for intelligent completion for and interaction
with PHP files.
+See also: \\[customize-group] RET phpinspect RET .
+
To initially index a project, use M-x `phpinspect-index-current-project'
in a buffer of one of the project files. Project root is detected with
`phpinspect-project-root-file-list'.
- [elpa] externals/phpinspect 9a25959aad 095/126: Use metadata tree instead of hash table for token lookup, (continued)
- [elpa] externals/phpinspect 9a25959aad 095/126: Use metadata tree instead of hash table for token lookup, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 43310092ad 081/126: Clear tree and edit tracker when reparsing (to ensure full reparse), ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 8dd9bb07e4 080/126: Increase phpinspect-bmap-last-token-before-point backward search limit to 100, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 75562aab35 085/126: Add some tests for edit tracker + patch newly discovered bugs, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 135263c533 110/126: Add tests for incremental parsing + fix parser bugs that came to light, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect ea7795c76e 106/126: Remove commented code, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 9b82c0d0f6 111/126: Reimplement `phpinspect-fix-imports' using metadata objects, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect c20df819b8 114/126: Give `phpinspect-buffer' responsibility over buffer indexation, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 04606a4756 121/126: Fix test, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect d51137e58e 112/126: Remove faulty edit tracker code based on wrong deduction, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect db3ec3b67d 124/126: Add custom variables for worker and pipeline pause time,
ELPA Syncer <=
- [elpa] externals/phpinspect 50d2bfeebe 002/126: Change indexer's cache dir from/to .cache/{phpns, phpinspect}, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 0b210309e7 041/126: Fix variable suggestion when there are loose dollar signs in the buffer, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect c50f2ae09b 020/126: Fix resolving of "static" and "self" types, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 1816495538 045/126: Use thread-live-p in stead of thread-alive-p for emacs 28.1 support, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 8d3bd21015 006/126: Add license information, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 811a9a9141 010/126: Add more tests for the parser code, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect b338aa9b75 012/126: Fix most of the byte-compilation warnings, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect f5fe299c01 027/126: Make functions that access the filesystem configurable and add test, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect a6bb09b2b3 026/126: Test and fix static function indexation, ELPA Syncer, 2023/08/12
- [elpa] externals/phpinspect 3838e02820 067/126: Prevent worker thread from associating with the current buffer, ELPA Syncer, 2023/08/12