Re: [code] Message Buffer not auto scrolling and slowdown

From: Ryan Pusztai <rpusztai.att.gmail.com>
Date: Wed, 4 Jun 2014 22:56:07 -0400

Hi Mitchell,

On Wed, Jun 4, 2014 at 4:36 PM, Ryan Pusztai <rpusztai.att.gmail.com> wrote:
>
> On Jun 4, 2014 3:02 PM, "Mitchell" <m.att.foicica.com> wrote:
> >
> > Hi Ryan,
> >
> >
> > On Tue, 3 Jun 2014, Ryan Pusztai wrote:
> >
> >> In Textadept 7.3 x86_64 on Ubuntu 14.04 x86_64, the message buffer does
> not
> >> seem to auto-scroll to the bottom anymore. I have set "ui.SILENT_PRINT =
> >> true" and am using tabs. I have split the view once and have the message
> >> buffer in one buffer and my code in the other. I am using the built-in
> >> "run" function and a Lua file and I am just watching "print()" from the
> >> script run. Does anyone else see this? I find it really hard because I
> >> usually look at that output and want the latest results to show. It does
> >> not seem to have anything to do with "ui.SILENT_PRINT = true". I run
> into
> >> some times where I set SILENT_PRINT to false and the tab is not
> selected as
> >> well.
> >
> >
> > Textadept only scrolls a print buffer when `ui.SILENT_PRINT` is false or
> that when print buffer is focused. Textadept has never had the ability to
> scroll print buffers in separate, split views.
>
> I thought so, but I used to use this as a separate view that is at the
> bottom and in other split views I run scripts that print messages. I would
> go days with this setup. I feel like tabs changed this behavior and the
> SILENT_PRINT is not functioning the same with tabs. I need the auto-scroll
> more that the silent print and if I just don't set any setting I still
> don't see the auto-scrolling work if you have 2 splits; 1 with a script and
> another with the message buffer. Now I thought it would focus the message
> buffer and auto scroll, but that is not what I see. It focuses the first
> time, but then I focus the script and run again until the text in the
> message buffer requires the buffer to scroll. I hope this makes sense and
> helps to reproduce the issue.
>
> >> Also I am seeing a big slow down as I print to the message buffer with a
> >> few hundred lines. I press Ctrl+r and then it prints the command-line,
> then
> >> hangs till all the text output is done printing to the message buffer. I
> >> can time my script and it shows it is running full speed, but the
> printing
> >> to the message buffer is slow. So slow that for a simple script taking
> .5
> >> seconds to run makes the OS think Textadept is hung and changes the
> window
> >> to the not responding color. This same script runs in half a second on a
> >> plain terminal. Anyone seeing this?
> >
> >
> > Textadept's "compile", "run", and "build" commands print a single line
> of process output at a time and search that line for any warnings or errors
> to mark. That is likely causing most of the slowdown. However, even running
> "for i = 1, 100 do print(i) end" from the command entry is a bit on the
> slow side. I think that's related to Textadept performing linear search to
> find a suitable print buffer.
>
> Well maybe run the script over and over and just watch how slow it gets. I
> know this worked much better in the 7.0 release. I wonder if it has to do
> with requiring socket. I am using that in the script. Does the scripts ran
> load their requires into Textadept?
>
> I am not sure if internals changed but I print all the time to debug as I
> develop and it gets so slow (5+ seconds before any prints happen) I feel
> like I need to use the terminal instead. And I am not talking about a
> massive amount of prints either but the buffer builds up (300-500 lines)
> over runs. Can I disable the search?
>
> P.S. I will try to run on an empty ~/.textadept directory just to make
> sure.
>
I tried it on Textadept 7.2/7.3 and an empty ~/.textadept directory. I
opened Textadept by running: "textadept -u ~/.ta_temp" to get a fresh
userhome.

I wrote a simple example that shows the issue very well on my 2 computers

```Lua```
local function main()
  -- Step 1: Run the script once just to print this single line to open a
[Message Buffer]
  print( "hello world" )

  -- Step 2: Split the view horizontally Ctrl+Alt+S
  -- Step 3: On the top view select this script. On the bottom view select
[Message Buffer]

  -- Step 4: Uncomment the following 3 line to show the slow down. (select
the 3 lines below, press Ctrl+/)
-- for i = 1, 100 do
-- print( ("[%i]"):format( i ) )
-- end
  -- Step 5: Run it a couple more times to see it really slow down
end

main()
```Lua```

Read the comments and it should show the issue very well. I am running
Ubuntu 14.04 amd64. Hope this helps.

--
Regards,
Ryan
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 04 Jun 2014 - 22:56:07 EDT

This archive was generated by hypermail 2.2.0 : Thu 05 Jun 2014 - 06:33:35 EDT