Menu

#325 Speedup opening of "Goto file..." dialog in large projects

Undefined
open
Feature_Request
2021-12-18
2016-04-02
No

When using "Goto file..." (Alt+G) feature on Code::Blocks workspace there is notable delay between pressing Alt+G and actual dialog show. It's about one second on AMD FX-8350 processor. Provided optimization significantly reduces delay, especially when workspace consists of many files in nested subdirectories.

Creation of such minor optimization was inspired by 10772 commit: "because we can handle it: added Java wizards for fun". So I decided to test whether opening of similar dialog in the Eclipse is slow or not. It opens immediately in the Eclipse, thats why this dialog must be opened quickly in Code::Blocks also.

1 Attachments

Discussion

  • Teodor Petrov

    Teodor Petrov - 2016-04-02
    • assigned_to: Teodor Petrov
     
  • Teodor Petrov

    Teodor Petrov - 2016-04-02

    Are you sure this patch doesn't change the behaviour?
    Because as far as I can see you've changed the comparison function.

    Do you have a sample project to test the optimization?

     
  • Sergey Bezgodov

    Sergey Bezgodov - 2016-04-04

    Optimization does not change the bahaviour, because first we sort vector by absolute path, then we remove consecutive duplicates and finally sort the vector by relative path.
    Comparator was changed for first sorting, here is enough to sort in that way, so duplicates will follow each other.

    If we compare file names prior to directories then we get a performance gain.
    So finally sorting became 5-6 times faster. Here is an exapmple of few files from Code::Blocks workspace:
    d:\Work\codeblocks\src\plugins\codecompletion\parser\token.h
    d:\Work\codeblocks\src\plugins\codecompletion\parser\tokenizer.h
    d:\Work\codeblocks\src\plugins\codecompletion\parser\tokentree.h

    To test optimization you can open Code::Blocks workspace, add to project empty tokentree.h file in d:\Work\codeblocks\src\ directory, then select tokentree.h via Alg+G and ensure both tokentree.h files are displayed in the list.

    Possibly we can optimize even more if remove first sorting, but there is need to add some unit test or example workspace into repository.

     
  • Teodor Petrov

    Teodor Petrov - 2016-04-04

    Do you have a sample project you've tested the optimization and you've measured the improvement?

     
  • Sergey Bezgodov

    Sergey Bezgodov - 2016-04-04

    I have no sample project. I've tested it on the Code::Blocks workspace and Code::Blocks project.

     
  • Teodor Petrov

    Teodor Petrov - 2017-01-29

    Better version of the patch pushed to trunk. More fixes are needed to make this UI even faster.

     
  • Teodor Petrov

    Teodor Petrov - 2017-08-05
    • Type: Patch --> Feature_Request
     
  • Miguel Gimenez

    Miguel Gimenez - 2021-12-18
     

    Related

    Commit: [r10983]


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.