[TxMt] Re: `mate <file>` from Terminal is occasionally very slow to open <file> in TextMate

Jay Soffian jaysoffian at gmail.com
Mon Aug 26 17:04:27 UTC 2019


Here's another hang in the same place (between "Created OakTabBarView
instance" and "Created OakDocumentView instance") according to the log,
along with a five second sample started just before I ran mate:

https://gist.github.com/jaysoffian/b585e3614620db506de306bfc9b55975

It hung for 20 seconds, so the sample has only the first five seconds of
the delay.

I'm using this wrapper around the mate command:

#!/bin/sh

find /private/tmp -name 'TextMate_*.sample.txt' -mtime +1h -delete

t0=$(date +%s)
sample TextMate 5 -wait >/dev/null 2>&1 &
/usr/local/bin/mate "$@"
t1=$(date +%s)

dt=$(expr $t1 - $t0)

if test $dt -gt 3
then
  sample_txt=$(find /private/tmp -name 'TextMate_*.sample.txt' | sort |
tail -1)
  cat <<__EOF__
mate took longer than 3 seconds. Sample here:

  $sample_txt

Grab log with:

  log show --predicate 'subsystem = "com.macromates.TextMate" && category =
"BringToFront"'"
__EOF__
fi

j.

On Mon, Aug 26, 2019 at 12:14 PM Jay Soffian <jaysoffian at gmail.com> wrote:

> Thanks. I just had another hang. I accidentally deleted the sample, but
> the log indicates it happened here:
>
> 2019-08-26 12:01:00.422862-0400 0x1b9a4fd  Default     0x0
>  37221  0    TextMate: [com.macromates.TextMate:BringToFront] TextMate:
> Created OakTabBarView instance
> 2019-08-26 12:01:10.571943-0400 0x1b9a4fd  Default     0x0
>  37221  0    TextMate: [com.macromates.TextMate:BringToFront] TextMate:
> Created OakDocumentView instance
>
> I'll report back next time it hangs with a sample.
>
> j.
>
>
> On Wed, Aug 21, 2019 at 6:09 AM Allan Odgaard <mailinglist at textmate.org>
> wrote:
>
>> On 19 Aug 2019, at 3:06, Jay Soffian wrote:
>>
>> Bump. Allan, any ideas here?
>>
>> I have added even more debug output into rc.30 available by
>> option-clicking Check Now in software update.
>>
>> Unfortunately the previous debug output was not enough to give me any
>> idea of what goes on; was therefore waiting for a second person to provide
>> logging output, I got this today via IRC, and for this person, it is also
>> stalling basically when creating the window, so now I littered the setup
>> code with log statements.
>>
>> For those with the issue, in addition to capturing the log, it would also
>> be useful to create an alias in your shell a la:
>>
>> alias s='sample TextMate 3'
>>
>> Then when you realize it is stalling, immediately create new tab in
>> terminal (⌘T) and run s to sample the process.
>>
>> It is very likely some system code that is failing to obtain a spinlock
>> with a 10s timeout, a sample should make this immediately obvious, where
>> log statements added by me may take a while to pinpoint what exactly is
>> triggering it (and pinpointing alone may not explain why, here a stack
>> trace from sample would be a lot more useful).
>>
>> _______________________________________________
>> TextMate mailing list
>> TextMate at lists.macromates.com
>> https://lists.macromates.com/listinfo/textmate
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macromates.com/textmate/attachments/20190826/cf7d6e80/attachment-0001.html>


More information about the TextMate mailing list