Open skvsree opened 11 years ago
Hi, @skvsree
The slowness occurs each time I type a Variable name or key in '.'. Looks like there is overall slowness. How do I test typescript-tools performance. Thanks
One example I can give is, when I type 'class' and then ClassVariable name the keystrokes are captured slow and emacs freezes.
The slowness occurs each time
Do it mean the slowness occurs in any buffer regardless of the buffer content? Do the slowness occur even if the buffer content is almost empty?
How do I test typescript-tools performance
See typescript-tools.
Then, check the following command performance under the same conditions as when you encounter the slowness on Emacs.
yes slowness occurs even when the buffer is empty or it has nothing to show. Also I tried showErrors in tss, it seems to be pretty fast.
I encountered the slowness by using the latest version of typescript-tools, too. I'll investigate the reason and ask the author of typescript-tools if necessary.
Tentatively, you can resolve this issue by using the older version of typescript-tools. I don't know the best version which you should use. At present, I'm using v0.2.0. You can install typescript-tools with specifying the version by the following step.
$ git clone git://github.com/clausreinke/typescript-tools.git
$ cd typescrript-tools
$ git tag -l
$ git checkout refs/tags/v0.2.0
$ npm install -g
BTW, I updated tss.el without relation to this issue for some minor changes.
Excellent it worked. Now performance is much better. Thanks. I leave the issue open, so you can map back if you are getting any fix from typescript-tools.
Did you updated elpa packages with new TSS?
On Sun, Oct 13, 2013 at 12:22 AM, Hiroaki Otsu notifications@github.comwrote:
I encountered the slowness by using the latest version of typescript-tools, too. I'll investigate the reason and ask the author of typescript-tools if necessary.
Tentatively, you can resolve this issue by using the older version of typescript-tools. I don't know the best version which you should use. At present, I'm using v0.2.0. You can install typescript-tools with specifying the version by the following step.
$ git clone git://github.com/clausreinke/typescript-tools.git $ cd typescrript-tools $ git tag -l $ git checkout refs/tags/v0.2.0 $ npm install -g
BTW, I updated tss.el without relation to this issue for some minor changes.
— Reply to this email directly or view it on GitHubhttps://github.com/aki2o/emacs-tss/issues/2#issuecomment-26203557 .
Balakumar S
Did you updated elpa packages with new TSS?
Sorry, I can't understand what you mean. I updated tss.el. The latest version of tss.el is 0.3.1.
Do you maintain http://melpa.milkbox.net/#/tss package ?
On Sat, Oct 19, 2013 at 8:56 AM, Hiroaki Otsu notifications@github.comwrote:
Did you updated elpa packages with new TSS?
Sorry, I can't understand what you mean. I updated tss.el https://github.com/aki2o/emacs-tss/blob/master/tss.el. The latest version of tss.el is 0.3.1.
— Reply to this email directly or view it on GitHubhttps://github.com/aki2o/emacs-tss/issues/2#issuecomment-26642462 .
Balakumar S
No, I don't. But, perhaps http://melpa.milkbox.net/#/tss is the mirror of this git repository. So, I guess the http://melpa.milkbox.net/#/tss package is updated by updating this repository file.
Hi, Any plans to update the Melpa rope, because I just installed typescipt and its plugins for Emacs in the following way:
* npm install --prefix /home/uqmlore1/apps/node_modules -g typescript
* npm install --prefix /home/uqmlore1/apps/node_modules -g typescript-tools
* tss from melpa
and experience the same problems with performance. I have even to wait few seconds, because of [tss] Load 'test.ts' and I do not get any pop up window with suggestions or errors.
Emacs settings:
; (setq load-path (cons "LOC" load-path))
(require 'package)
(package-initialize)
; I want white spaces to be highlighted
(require 'whitespace)
(global-whitespace-mode 1)
; no tilde!
(setq make-backup-files nil)
; I want spaces for indentation
(setq-default indent-tabs-mode nil)
(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.
'(inhibit-startup-screen t)
'(package-archives (quote (("gnu" . "http://elpa.gnu.org/packages/") ("melpa" . "http://melpa.milkbox.net/packages/")))))
(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.
)
;; If use bundled typescript.el,
(require 'typescript)
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
(require 'tss)
;; Key binding
(setq tss-popup-help-key "C-:")
(setq tss-jump-to-definition-key "C->")
;; If there is the mode, which you want to enable TSS,
(add-to-list 'tss-enable-modes 'hoge-mode)
;; If there is the key, which you want to start completion of auto-complete.el,
(add-to-list 'tss-ac-trigger-command-keys "=")
;; Do setting recommemded configuration
(tss-config-default)
Hi,
I'm currently hunting the sources of slowness. The one described in issue #3 should be fixed now. I noticed that a lack of synchronization between error handling system and process' waiting loop leads to useless timeout. For example, when I write the source code:
class C {
private _person: string;
public get person(): string {
return this._person;
}
public set // <<< I'm creating a setter for "person"
}
When I write the 'p', the completion is launched. TSS outputs an error, perfectly catched by the plugin's code. However, the loop is still waiting for TSS' response, as the error handling system doesn't do anything to stop the waiting loop in this case.
I'm not sure emacs-tss expected autocomplete to be launched at this time, it may be my configuration. But I think stoping the loop at error would make the plugin more robust.
EDIT: I realize it should not be normal to get an error here. I'm investigating on it.
The TSS error came from a bug in typescript-tools (https://github.com/clausreinke/typescript-tools/issues/12), which has been fixed on version 0.2.1. Now I updated typescript-tools, but TSS returns "null" as a result of the completion request, which isn't an answer recognized in the code.
In the case of autocompletion, I suppose setting the server response to something like ' ( ( entries . nil ) ) would do the job, but what could we do if other requests can get null as response?
I updated tss.el about the following changes of typescript-tools.
I think stoping the loop at error would make the plugin more robust.
At present, I left the loop continue even if error response exists, because I guess that there is also the case, which code is able to continue. But, If it causes slowness frequently, I'll make the loop stop if error response exists. Please let me know if it happened.
Nice, it fixed the problem, thank you!
At present, I left the loop continue even if error response exists, because I guess that there is also the case, which code is able to continue.
I understand. And it can also prevent missing some bugs like here, so your choice makes sense.
For now I don't see problems related to this, but I will tell you if it happens.
Hi
I have setup a TSS plugin in emacs as per your instructions , but I find it extremely slow. Is this normal or am I missing something here