caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] lag when using typerex
@ 2012-05-07 20:51 Joel Reymont
  2012-05-08 11:10 ` Daniel Bünzli
  2012-05-09  8:17 ` Thomas Gazagnaire
  0 siblings, 2 replies; 11+ messages in thread
From: Joel Reymont @ 2012-05-07 20:51 UTC (permalink / raw)
  To: caml-list

Is it just me or is there a significant lag when using TypeRex in Emacs?

This is particularly noticeable when deleting by using the backspace key.

--------------------------------------------------------------------------
Working on AlgoKit, a new algorithmic trading platform using Rithmic R|API
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] lag when using typerex
  2012-05-07 20:51 [Caml-list] lag when using typerex Joel Reymont
@ 2012-05-08 11:10 ` Daniel Bünzli
  2012-05-08 21:44   ` Daniel Bünzli
  2012-05-09  1:36   ` Francois Berenger
  2012-05-09  8:17 ` Thomas Gazagnaire
  1 sibling, 2 replies; 11+ messages in thread
From: Daniel Bünzli @ 2012-05-08 11:10 UTC (permalink / raw)
  To: Joel Reymont; +Cc: caml-list

> Is it just me or is there a significant lag when using TypeRex in Emacs?
> 
> This is particularly noticeable when deleting by using the backspace key.

Here, the lag was due to auto complete mode. Don't invoke it automatically. That's what I have : 

(add-to-list 'load-path "/Users/dbuenzli/.emacs.d/auto-complete-mode")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories 
"/Users/dbuenzli/.emacs.d/auto-complete-mode/ac-dict")
(ac-config-default)
(global-set-key (kbd "S-<tab>") 'auto-complete)
(setq ac-auto-start nil)
;;;; I want immediate menu pop-up
;;(setq ac-auto-show-menu 0.)
;;;; Short delay before showing help
;;(setq ac-quick-help-delay 0.3)
;;;; Number of characters required to start (nil to disable)
;;(setq ac-auto-start 0)



Best,

Daniel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] lag when using typerex
  2012-05-08 11:10 ` Daniel Bünzli
@ 2012-05-08 21:44   ` Daniel Bünzli
  2012-05-08 21:49     ` Joel Reymont
  2012-05-09  1:41     ` Francois Berenger
  2012-05-09  1:36   ` Francois Berenger
  1 sibling, 2 replies; 11+ messages in thread
From: Daniel Bünzli @ 2012-05-08 21:44 UTC (permalink / raw)
  To: Joel Reymont; +Cc: caml-list

In fact there is another source of lag on osx, syntax highlighting.  

https://github.com/OCamlPro/typerex/issues/2#issuecomment-4537263

I just use ocaml's emacs-mode for that, see the full dump of my config below,

Best,

Daniel


;; Typerex mode
;; Loading TypeRex mode for OCaml files
(add-to-list 'load-path "/Users/dbuenzli/.emacs.d")
(add-to-list 'auto-mode-alist '("\\.ml[iylp]?" . typerex-mode))
(add-to-list 'interpreter-mode-alist '("ocamlrun" . typerex-mode))
(add-to-list 'interpreter-mode-alist '("ocaml" . typerex-mode))
(autoload 'typerex-mode "typerex" "Major mode for editing Caml code" t)

;; TypeRex mode configuration
(setq ocp-server-command "/usr/local/bin/ocp-wizard")
(setq-default indent-tabs-mode nil)
(setq ocp-auto-complete t)
;(setq ocp-theme "caml_like")
;(setq ocp-syntax-coloring t)

;; Work around slow syntax highligthing.
(setq ocp-syntax-coloring nil)
(setq load-path (cons "~/.emacs.d/caml-mode" load-path))
(if window-system (require 'caml-font))
(add-hook 'typerex-mode-hook 'caml-font-set-font-lock)

; OCaml identing style
;(setq typerex-in-indent 0)
(setq typerex-let-always-indent nil)
(setq typerex-with-indent 0)
(setq typerex-function-indent 0)
(setq typerex-fun-indent 0)
(setq typerex-type-indent 0)
(setq typerex-if-then-else-indent 0)














Le mardi, 8 mai 2012 à 13:10, Daniel Bünzli a écrit :

> > Is it just me or is there a significant lag when using TypeRex in Emacs?
> >  
> > This is particularly noticeable when deleting by using the backspace key.
>  
> Here, the lag was due to auto complete mode. Don't invoke it automatically. That's what I have :  
>  
> (add-to-list 'load-path "/Users/dbuenzli/.emacs.d/auto-complete-mode")
> (require 'auto-complete-config)
> (add-to-list 'ac-dictionary-directories  
> "/Users/dbuenzli/.emacs.d/auto-complete-mode/ac-dict")
> (ac-config-default)
> (global-set-key (kbd "S-<tab>") 'auto-complete)
> (setq ac-auto-start nil)
> ;;;; I want immediate menu pop-up
> ;;(setq ac-auto-show-menu 0.)
> ;;;; Short delay before showing help
> ;;(setq ac-quick-help-delay 0.3)
> ;;;; Number of characters required to start (nil to disable)
> ;;(setq ac-auto-start 0)
>  
>  
>  
> Best,
>  
> Daniel
>  
> --  
> Caml-list mailing list. Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] lag when using typerex
  2012-05-08 21:44   ` Daniel Bünzli
@ 2012-05-08 21:49     ` Joel Reymont
  2012-05-08 22:05       ` Daniel Bünzli
  2012-05-09  1:41     ` Francois Berenger
  1 sibling, 1 reply; 11+ messages in thread
From: Joel Reymont @ 2012-05-08 21:49 UTC (permalink / raw)
  To: Daniel Bünzli; +Cc: caml-list

What's the point of using TypeRex then?

On Tue, May 8, 2012 at 10:44 PM, Daniel Bünzli
<daniel.buenzli@erratique.ch> wrote:
> In fact there is another source of lag on osx, syntax highlighting.
>
> https://github.com/OCamlPro/typerex/issues/2#issuecomment-4537263
>
> I just use ocaml's emacs-mode for that, see the full dump of my config below,
>
> Best,
>
> Daniel
>
>
> ;; Typerex mode
> ;; Loading TypeRex mode for OCaml files
> (add-to-list 'load-path "/Users/dbuenzli/.emacs.d")
> (add-to-list 'auto-mode-alist '("\\.ml[iylp]?" . typerex-mode))
> (add-to-list 'interpreter-mode-alist '("ocamlrun" . typerex-mode))
> (add-to-list 'interpreter-mode-alist '("ocaml" . typerex-mode))
> (autoload 'typerex-mode "typerex" "Major mode for editing Caml code" t)
>
> ;; TypeRex mode configuration
> (setq ocp-server-command "/usr/local/bin/ocp-wizard")
> (setq-default indent-tabs-mode nil)
> (setq ocp-auto-complete t)
> ;(setq ocp-theme "caml_like")
> ;(setq ocp-syntax-coloring t)
>
> ;; Work around slow syntax highligthing.
> (setq ocp-syntax-coloring nil)
> (setq load-path (cons "~/.emacs.d/caml-mode" load-path))
> (if window-system (require 'caml-font))
> (add-hook 'typerex-mode-hook 'caml-font-set-font-lock)
>
> ; OCaml identing style
> ;(setq typerex-in-indent 0)
> (setq typerex-let-always-indent nil)
> (setq typerex-with-indent 0)
> (setq typerex-function-indent 0)
> (setq typerex-fun-indent 0)
> (setq typerex-type-indent 0)
> (setq typerex-if-then-else-indent 0)
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Le mardi, 8 mai 2012 à 13:10, Daniel Bünzli a écrit :
>
>> > Is it just me or is there a significant lag when using TypeRex in Emacs?
>> >
>> > This is particularly noticeable when deleting by using the backspace key.
>>
>> Here, the lag was due to auto complete mode. Don't invoke it automatically. That's what I have :
>>
>> (add-to-list 'load-path "/Users/dbuenzli/.emacs.d/auto-complete-mode")
>> (require 'auto-complete-config)
>> (add-to-list 'ac-dictionary-directories
>> "/Users/dbuenzli/.emacs.d/auto-complete-mode/ac-dict")
>> (ac-config-default)
>> (global-set-key (kbd "S-<tab>") 'auto-complete)
>> (setq ac-auto-start nil)
>> ;;;; I want immediate menu pop-up
>> ;;(setq ac-auto-show-menu 0.)
>> ;;;; Short delay before showing help
>> ;;(setq ac-quick-help-delay 0.3)
>> ;;;; Number of characters required to start (nil to disable)
>> ;;(setq ac-auto-start 0)
>>
>>
>>
>> Best,
>>
>> Daniel
>>
>> --
>> Caml-list mailing list. Subscription management and archives:
>> https://sympa-roc.inria.fr/wws/info/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
>



-- 
--------------------------------------------------------------------------
Working on AlgoKit, a new algorithmic trading platform using Rithmic R|API
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] lag when using typerex
  2012-05-08 21:49     ` Joel Reymont
@ 2012-05-08 22:05       ` Daniel Bünzli
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Bünzli @ 2012-05-08 22:05 UTC (permalink / raw)
  To: Joel Reymont; +Cc: caml-list



Le mardi, 8 mai 2012 à 23:49, Joel Reymont a écrit :

> What's the point of using TypeRex then?

* Refactoring tools (renaming).  
* Jumping from a name to its definition.  
* Name autocomplete and its documentation.  

Best,

Daniel




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] lag when using typerex
  2012-05-08 11:10 ` Daniel Bünzli
  2012-05-08 21:44   ` Daniel Bünzli
@ 2012-05-09  1:36   ` Francois Berenger
  1 sibling, 0 replies; 11+ messages in thread
From: Francois Berenger @ 2012-05-09  1:36 UTC (permalink / raw)
  To: caml-list

On 05/08/2012 08:10 PM, Daniel Bünzli wrote:
>> Is it just me or is there a significant lag when using TypeRex in Emacs?
>>
>> This is particularly noticeable when deleting by using the backspace key.
>
> Here, the lag was due to auto complete mode. Don't invoke it automatically. That's what I have :

I don't have autocomplete turned on and also noticed some lag.
For me it is when I reverse delete a word (M-backspace).

> (add-to-list 'load-path "/Users/dbuenzli/.emacs.d/auto-complete-mode")
> (require 'auto-complete-config)
> (add-to-list 'ac-dictionary-directories
> "/Users/dbuenzli/.emacs.d/auto-complete-mode/ac-dict")
> (ac-config-default)
> (global-set-key (kbd "S-<tab>") 'auto-complete)
> (setq ac-auto-start nil)
> ;;;; I want immediate menu pop-up
> ;;(setq ac-auto-show-menu 0.)
> ;;;; Short delay before showing help
> ;;(setq ac-quick-help-delay 0.3)
> ;;;; Number of characters required to start (nil to disable)
> ;;(setq ac-auto-start 0)
>
>
>
> Best,
>
> Daniel
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] lag when using typerex
  2012-05-08 21:44   ` Daniel Bünzli
  2012-05-08 21:49     ` Joel Reymont
@ 2012-05-09  1:41     ` Francois Berenger
  1 sibling, 0 replies; 11+ messages in thread
From: Francois Berenger @ 2012-05-09  1:41 UTC (permalink / raw)
  To: caml-list

On 05/09/2012 06:44 AM, Daniel Bünzli wrote:
> In fact there is another source of lag on osx, syntax highlighting.

It lags for me and I'm on Ubuntu.
I guess syntax highlighting was the problem for me.

> https://github.com/OCamlPro/typerex/issues/2#issuecomment-4537263
>
> I just use ocaml's emacs-mode for that, see the full dump of my config below,
>
> Best,
>
> Daniel
>
>
> ;; Typerex mode
> ;; Loading TypeRex mode for OCaml files
> (add-to-list 'load-path "/Users/dbuenzli/.emacs.d")
> (add-to-list 'auto-mode-alist '("\\.ml[iylp]?" . typerex-mode))
> (add-to-list 'interpreter-mode-alist '("ocamlrun" . typerex-mode))
> (add-to-list 'interpreter-mode-alist '("ocaml" . typerex-mode))
> (autoload 'typerex-mode "typerex" "Major mode for editing Caml code" t)
>
> ;; TypeRex mode configuration
> (setq ocp-server-command "/usr/local/bin/ocp-wizard")
> (setq-default indent-tabs-mode nil)
> (setq ocp-auto-complete t)
> ;(setq ocp-theme "caml_like")
> ;(setq ocp-syntax-coloring t)
>
> ;; Work around slow syntax highligthing.
> (setq ocp-syntax-coloring nil)
> (setq load-path (cons "~/.emacs.d/caml-mode" load-path))
> (if window-system (require 'caml-font))
> (add-hook 'typerex-mode-hook 'caml-font-set-font-lock)
>
> ; OCaml identing style
> ;(setq typerex-in-indent 0)
> (setq typerex-let-always-indent nil)
> (setq typerex-with-indent 0)
> (setq typerex-function-indent 0)
> (setq typerex-fun-indent 0)
> (setq typerex-type-indent 0)
> (setq typerex-if-then-else-indent 0)
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Le mardi, 8 mai 2012 à 13:10, Daniel Bünzli a écrit :
>
>>> Is it just me or is there a significant lag when using TypeRex in Emacs?
>>>
>>> This is particularly noticeable when deleting by using the backspace key.
>>
>> Here, the lag was due to auto complete mode. Don't invoke it automatically. That's what I have :
>>
>> (add-to-list 'load-path "/Users/dbuenzli/.emacs.d/auto-complete-mode")
>> (require 'auto-complete-config)
>> (add-to-list 'ac-dictionary-directories
>> "/Users/dbuenzli/.emacs.d/auto-complete-mode/ac-dict")
>> (ac-config-default)
>> (global-set-key (kbd "S-<tab>") 'auto-complete)
>> (setq ac-auto-start nil)
>> ;;;; I want immediate menu pop-up
>> ;;(setq ac-auto-show-menu 0.)
>> ;;;; Short delay before showing help
>> ;;(setq ac-quick-help-delay 0.3)
>> ;;;; Number of characters required to start (nil to disable)
>> ;;(setq ac-auto-start 0)
>>
>>
>>
>> Best,
>>
>> Daniel
>>
>> --
>> Caml-list mailing list. Subscription management and archives:
>> https://sympa-roc.inria.fr/wws/info/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
>
>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] lag when using typerex
  2012-05-07 20:51 [Caml-list] lag when using typerex Joel Reymont
  2012-05-08 11:10 ` Daniel Bünzli
@ 2012-05-09  8:17 ` Thomas Gazagnaire
  2012-05-09 10:17   ` Boris Hollas
  2012-05-09 11:24   ` Joel Reymont
  1 sibling, 2 replies; 11+ messages in thread
From: Thomas Gazagnaire @ 2012-05-09  8:17 UTC (permalink / raw)
  To: Joel Reymont; +Cc: caml-list

Which OS/editor are you using ? TypeRex is known to be slow with aquamacs and if anyone knows why aquamacs sockets are so slow we will be happy to improve that.

On some systems, you may notice a lag when you keep pressing a key for a long time, this is often due to the syntax coloring. If it disturbs you, you can switch off syntax coloring as explained in [2] and fall back to the tuareg coloration (you can also directly use Daniel's settings).

Cheers,
Thomas

[1] http://www.typerex.org/manual-setup.html#configuration

On May 7, 2012, at 10:51 PM, Joel Reymont wrote:

> Is it just me or is there a significant lag when using TypeRex in Emacs?
> 
> This is particularly noticeable when deleting by using the backspace key.
> 
> --------------------------------------------------------------------------
> Working on AlgoKit, a new algorithmic trading platform using Rithmic R|API
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
> 
> -- 
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] lag when using typerex
  2012-05-09  8:17 ` Thomas Gazagnaire
@ 2012-05-09 10:17   ` Boris Hollas
  2012-05-09 11:24   ` Joel Reymont
  1 sibling, 0 replies; 11+ messages in thread
From: Boris Hollas @ 2012-05-09 10:17 UTC (permalink / raw)
  To: Thomas Gazagnaire; +Cc: caml-list

I used Typerex with Emacs 23 on Debian and it was very slow (> 10 s)
when looking up definitions in a 170 kLOC project. A number of times,
the search was aborted with a memory exception.
-- 
Best regards,
Boris


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] lag when using typerex
  2012-05-09  8:17 ` Thomas Gazagnaire
  2012-05-09 10:17   ` Boris Hollas
@ 2012-05-09 11:24   ` Joel Reymont
  2012-05-09 20:20     ` Daniel Bünzli
  1 sibling, 1 reply; 11+ messages in thread
From: Joel Reymont @ 2012-05-09 11:24 UTC (permalink / raw)
  To: Thomas Gazagnaire; +Cc: caml-list

I'm using Carbon Emacs (not Aquamacs!) on the Mac and simple editing
is lagging. Deleting too.

I did follow Daniel's suggestions but TypeRex is still lagging. No
need to keep keys pressed, simply hitting the delete key or typing
does it.

On Wed, May 9, 2012 at 9:17 AM, Thomas Gazagnaire <thomas@ocamlpro.com> wrote:
> Which OS/editor are you using ? TypeRex is known to be slow with aquamacs and if anyone knows why aquamacs sockets are so slow we will be happy to improve that.

--------------------------------------------------------------------------
Working on AlgoKit, a new algorithmic trading platform using Rithmic R|API
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Caml-list] lag when using typerex
  2012-05-09 11:24   ` Joel Reymont
@ 2012-05-09 20:20     ` Daniel Bünzli
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Bünzli @ 2012-05-09 20:20 UTC (permalink / raw)
  To: Joel Reymont, Thomas Gazagnaire; +Cc: caml-list



Le mercredi, 9 mai 2012 à 13:24, Joel Reymont a écrit :

> I'm using Carbon Emacs (not Aquamacs!) on the Mac and simple editing
> is lagging. Deleting too.


Yes it's not only on aquaemacs, I reported that a few months ago :  

https://github.com/OCamlPro/typerex/issues/2#issuecomment-4537263

> I did follow Daniel's suggestions but TypeRex is still lagging. No
> need to keep keys pressed, simply hitting the delete key or typing
> does it.

  
Strange, here with emacs 23.4.1 from http://emacsformacosx.com/ (which seems down at the moment) and the config I posted there's no lag.  

Best,

Daniel




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-05-09 20:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07 20:51 [Caml-list] lag when using typerex Joel Reymont
2012-05-08 11:10 ` Daniel Bünzli
2012-05-08 21:44   ` Daniel Bünzli
2012-05-08 21:49     ` Joel Reymont
2012-05-08 22:05       ` Daniel Bünzli
2012-05-09  1:41     ` Francois Berenger
2012-05-09  1:36   ` Francois Berenger
2012-05-09  8:17 ` Thomas Gazagnaire
2012-05-09 10:17   ` Boris Hollas
2012-05-09 11:24   ` Joel Reymont
2012-05-09 20:20     ` Daniel Bünzli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).