6,685587
Grand MasterGrand Master
6,685587

    May 19, 2010#16

    Well, I see also the hour glass pointer when switching to another file, but just for a very short time even when function list scanning takes longer. The code folding and the syntax highlighting are also done with background threads and therefore should not prevent you on working on the file. However, to find out what is causing the problem it would be good to disable one after the other.
    1. Disable code folding at Configuration - Editor Display - Code Folding and test if this makes already a difference.
    2. Next uncheck Enable syntax coloring at Configuration - Editor Display - Syntax Highlighting and test if this makes now a difference.
    3. If code folding and syntax highlighting makes no difference, enable both options again, and select for both files No Highlighting at View - View as (Highlighting File Type). That turns off code folding, syntax highlighting and the scan for function strings for the function list view. Test if toggling the active file is fast now.
    If one of the tests results in making the activated file quickly available for editing we can together look into the definitions for that feature.

    In general it is advisable for C/C++ to look on the regular expression strings used to find functions and since UE v16.00 also the function parameters and local variables and adapt and remove what not needed for your files. For example if you are working only with C files, you can remove the regular expressions used for C++. Further the expressions in standard wordfile c_cplusplus.uew are defined to match as many different C/C++ coding styles as possible. Adapting them to what you really need for your coding style and eliminate those not really needed for your files improves performance a lot. A simple test to find out what is needed and what could be removed is to use the regular expressions as you can see in the wordfile in a Find in Files searching in all your *.c files. If such an UltraEdit regular expression finds no string in any of your *.c files or just non function strings found, you can remove that regular expression from your wordfile.
    Best regards from an UC/UE/UES for Windows user from Austria

    3
    NewbieNewbie
    3

      May 20, 2010#17

      Hi Mofi,

      The problem seems to really come from the parsing while looking for the function in the file.

      If I modify the wordfiles for cplusplus, and remove the first regular expression:

      //return type on separate line from function name and args
      /TGFindStr = "%^([a-z_][a-z_0-9^[^]*]++^)[ ^t]++([^p*&:, ^t^[^]a-z_0-9./()!]++)[~;]"

      then it is much quicker.. but I don't get the functions listed anymore (!).

      Also, I noticed that even when I open an empty file, the parsing might be slow too. This is very odd. I even wonder if I shouldn't go back to my old v12.10b... :-(... But I didn't gave up yet!

      6,685587
      Grand MasterGrand Master
      6,685587

        May 23, 2010#18

        Instead of re-installing v12.10b why not using the wordfile for C/C++ for v12.10b or why not using the function strings from your old wordfile in the new c_cplusplus.uew?

        As I have already written the standard wordfile c_cplusplus.uew of UE v16.00 makes use of the function string group capability introduced with v16.00. But that feature surely helpful for many programmers has the disadvantage that more regular expression searches must be run on a C/C++ file. And the complex general regular expression strings are designed to find as much function strings and nowadays also function parameters and local function variables in as many different coded C/C++ files as possible without finding strings which are not function names, function parameters or function variables.

        There is currently undisputed a perfomance problem with function list scanning which will be hopefully fixed soon in one of the next versions of UE v16.xx. But best practice to increase speed of this process is to reduce the regular expression strings in the wordfile and adapt the expression to what is really required for your C/C++ files.

        For example

        /TGFindStr = "%^([a-z_][a-z_0-9^[^]*]++^)[ ^t]++([^p*&:, ^t^[^]a-z_0-9./()!]++)[~;]"

        is for function definition lines without a return type, in other words for something like

        Code: Select all

        function1 ()
        {
        }
        
        function2( int iVar1, unsigned int* puiVar2 )
        {
        }
        
        _function3 (
           int iVar1,
           int iVar2
        )
        {
        }
        If the function definition lines in your C files always start with the return type as strongly recommended, you don't need this regular expression. But according to your last post your C files omit keyword void for functions without a return value and therefore you need that expression. Inside every function UltraEdit searches with new c_cplusplus.uew further for function parameters inside (...) and function variables inside {...} which of course makes the function list scanning much slower than before.
        Best regards from an UC/UE/UES for Windows user from Austria

        Read more posts (-12 remaining)