Occasional performance hickups when editing, possibly my own fault. Any obvious way to profile TM performance?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Occasional performance hickups when editing, possibly my own fault. Any obvious way to profile TM performance?

Bert Zangle
Hey

I'm occasionally experiencing  smaller performance hickups in TM. Writing a line of code, there's a short delay before the input appears; delay is maybe in the range of half a second. It's infrequent enough not to be really bothersome, but ideally, I'd like to know the cause.

It could in fact be some (too expensive) regexes I defined in my customized language grammars, but I can't say for sure right now.

That's why I was wondering: is there a relatively simple way I can profile TM/TM processes, in order to find out if it is in fact my own grammar rules causing these hickups, or if it's something else?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Occasional performance hickups when editing, possibly my own fault. Any obvious way to profile TM performance?

Bert Zangle
(update)

The delays seems to be getting more frequent. Doesn't happen outside of TM, so I don't think it's a system-wide problem.

My best guess right now is that either it's related to some regexes (as described above), or it's some other TM performance problem. Any ideas how to test this further (other than disabling each of the regexes one by one, which I'd prefer to do only as a last resort)?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Occasional performance hickups when editing, possibly my own fault. Any obvious way to profile TM performance?

Allan Odgaard-4

On 27 Nov 2016, at 21:35, Bert Zangle wrote:

The delays seems to be getting more frequent. Doesn't happen outside of TM,
so I don't think it's a system-wide problem.

My best guess right now is that either it's related to some regexes (as
described above), or it's some other TM performance problem.

I doubt it is related to regular expressions in your custom grammar, as these run in a separate thread.

It could either be that you have a command running “on document changes” or possibly that you are out of memory and the delays are causing by swapping memory out to disk.

When a delay happens you can run sample TextMate 1 in a terminal to see what TextMate is doing.

You may want to make an alias or bind this to a hotkey, so that you can do it the instant you noticed that TextMate stalls.

You can also try to (install and then) run pstree when it is stalling to see if there is any subprocess being run by TextMate.



_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Occasional performance hickups when editing, possibly my own fault. Any obvious way to profile TM performance?

Bert Zangle
Allan Odgaard-4 wrote
It could either be that you have a command running “on document
changes” or possibly that you are out of memory and the delays are
causing by swapping memory out to disk.

When a delay happens you can run `sample TextMate 1` in a terminal to
see what TextMate is doing.

You may want to make an alias or bind this to a hotkey, so that you can
do it the instant you noticed that TextMate stalls.

You can also try to (install and then) run `pstree` when it is stalling
to see if there is any subprocess being run by TextMate.
Bound both of them to a shortcut, will see what I get when it happens again.

I added `footprint` in case the problem is memory related like you suggest, does that make sense?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Occasional performance hickups when editing, possibly my own fault. Any obvious way to profile TM performance?

Allan Odgaard-4

On 28 Nov 2016, at 21:59, Bert Zangle wrote:

I added `footprint` in case the problem is memory related like you suggest,
does that make sense?

For a quick check run vm_stat and look at pageouts.

If this number is low, swapping is unlikely to be the issue.



_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Loading...