Viewing 1 post (of 1 total)
  • Author
    Posts
  • #22358

    sky
    Participant

    File A: 260MB 1,380,000 lines
    File B: Only 1 line (Untitled-2)

    1. Progress speed in current Tab:
    a. In current Tab (File A), enable “Word Count” plugin, and click “Refresh Now”, the progress bar is slow in such big file.
    b. If click “Refresh Now” in File A Tab, and then switch the Tab to “Untitled-2”, the progress bar will become more faster.
    But the some of the count results seems incorrect, and sometimes it will Refresh again for the “Untitled-2”.

    Example result as below: Characters and Pages was wrong. But Lines number is correct.
    count

    2. Regular Expressions speed:
    If try to add a Regular Expressions in Customize Queries, the progress bar is more slower then default Queries in such big file, even switch to another Tab.

    For example, add a query [\x{3400}-\x{9fff}\x{f900}-\x{fa2d}] to count “CJK Ideographs” from the drop-down list.
    But if use “Find command” it just take around 4 seconds to count (in 2 threads).
    Suggest to use more threads and optimize the calculation may improve the “Word Count” plugin speed.

    ========
    My workaround solution is write a Macro with “Find command”.

    countA = document.selection.Find("[\\x{3400}-\\x{4DB5}]",eeFindReplaceRegExp | eeFindReplaceQuiet | eeFindCount,eeExFindRegexOnigmo);
    countB = document.selection.Find("[\\x{20000}-\\x{2A6DF}]",eeFindReplaceRegExp | eeFindReplaceQuiet | eeFindCount,eeExFindRegexOnigmo);
    ...

    Question 1:
    The speed is good, but it will display some “Counting Matches” message box.
    Could you please advise if any option to hide the message box during Macro execution. (ie. Silent mode, similar to “eeFindReplaceQuiet”).
    counting

    Question 2:
    If use EmEditor JavaScript match() method, it can be silenced, but speed is slower than “Find command”.
    And due to Normal Regex can’t recognized \uXXXXX (five digits Hex code), it become more complex to write a regular expression for CJK Ideographs.
    Ex. Onigmo: document.selection.Find(“[\\x{20000}-\\x{2A6DF}]“….
    Normal Regex: (str.match(/[\ud840-\ud868][\udc00-\udfff]|\ud869[\udc00-\uded6]/g) || []).length;
    Therefore, could you please advise how to specify Onigmo as the regular expression engine in EmEditor Macro JavaScript match()?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.