Author Topic: New buffer opened when you press return from Preview tool.  (Read 2432 times)

TKasparek

  • Senior Community Member
  • Posts: 246
  • Hero Points: 29
New buffer opened when you press return from Preview tool.
« on: October 17, 2019, 10:42:05 PM »
The preview tool seems to be overly lagging for me. Many times it never actually shows a symbol when I'm clearly on something it should be showing. Something as simple as a local variable often will not show. When this happens, if you click in the empty Preview area and press enter it'll load a blank buffer.


SlickEdit Pro 2019 (v24.0.0.8 64-bit)

Serial number: WMX110555
Licensed number of users: Single user
License file: C:\ProgramData\slickedit\24\slickedit.lic

Build Date: October 2, 2019
Emulation: CUA

OS: Windows 10 x64
OS Version: 10.00.0 
Memory: 27% Load, 9004MB/32442MB Physical, 12589MB/37306MB Page File, 5633MB/134217727MB Virtual
Shell Information: C:\WINDOWS\system32\cmd.exe /q
Screen Size: 1920 x 1080, 1080 x 1920, 1080 x 1920

Project Type: Cpp
Language: .cpp (C/C++)
Encoding: Automatic

Installation Directory: C:\Program Files\SlickEdit Pro 24.0.0\ (non-removable drive,NTFS,304846MB free)
Configuration Directory: C:\Users\thomas.kasparek\Documents\My SlickEdit Config\24.0.0\ (non-removable drive,NTFS,304846MB free)
Migrated from: C:\Users\thomas.kasparek\Documents\My SlickEdit Config\23.0.2\

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: New buffer opened when you press return from Preview tool.
« Reply #1 on: October 17, 2019, 10:49:27 PM »
I will look into that tomorrow. (the loading an empty buffer).

Preview can be a bit slow.  I have profiled it in the past, and most of the time comes down to loading the file being previewed into view.  There is some necessary inefficiency there because we do not want to waste memory caching large files in memory.

TKasparek

  • Senior Community Member
  • Posts: 246
  • Hero Points: 29
Re: New buffer opened when you press return from Preview tool.
« Reply #2 on: October 18, 2019, 03:31:07 PM »
I'm seeing a lot of times when it doesn't actually load the preview no matter how long I wait now. I think it may be time to rebuild my config from scratch... :/

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: New buffer opened when you press return from Preview tool.
« Reply #3 on: October 18, 2019, 06:02:04 PM »
A few things:

1) The problem with opening an empty buffer will be fixed in a hot fix. 
    Thank you for pointing that one out.  Very good catch.

2) You can speed up the Preview window's responsiveness by changing the following settings:

    Tools > Options > Editing > Context Tagging > Tagging Tool Windows >
        Update tool windows after (ms):   default is 1000
        Additional time to wait before updating tool windows (ms):  default is 500
        Preview window symbol lookup timeout (ms):  default is 1000

    So the default is to give it a second and a half before updating: 
    This is intended to prevent the tool windows from getting in the way
    unless you have really stopped typing for a while.

    Then, it has one second to find the symbol.  If the context tagging is
    a really difficult case, (smart pointers, STL, Boost or files on remote file systems),
    that might not be enough time and the Preview will just give up in silent defeat.
    Sometimes because of caching, if you move the cursor, it will take another
    shot at it and show the symbol, sometimes not.

    I am adding some code to the hot fix so that the Preview tool window
    indicates in the Comments section if the symbol search timed out.

3) Another setting further down on that same page (under Maximums):
   
     Maximum size of files to tag (KB):  default 2048

    If the file containing the symbol which is to be previewed exceeds this size,
    the Preview will not show the file contents.  It does this in order to avoid
    loading a very large file repeatedly.

    I am also adding some code to the hot fix to indicate in the Comments
    section of the preview window if a file was too large to load.