Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Optimizations for improving speed#2825

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
daxgames merged 2 commits intocmderdev:developmentfromdaxgames:more_speed_2
Jan 5, 2025

Conversation

@daxgames
Copy link
Member

@daxgamesdaxgames commentedFeb 11, 2023
edited
Loading

Optimize for Speed of Launch for Cmd.exe sessions.

  • Removed duplicate path entry prevention, akaenhance_path functionality from%cmder_root%\vendor\init.bat.

  • %cmder_root%\vendor\init.bat is now a run once thing that generates%cmder_root%\config\user_init.cmd.

  • %cmder_root%\config\user_init.cmd :

    • Is generated from a template,%cmder_root%\vendor\user_init.cmd.template, if it does not exist.

      • Is owned by the end user to edit however necessary.
      • Can be re-generated by:
        • Deleting the current output file and starting a newcmd::Cmder session.

        • Running a powershell script:

          image

    • Is 3+ times faster than the currentmaster branch%cmder_root%\vendor\init.bat

    • Is esentially hardcoded version ofinit.bat that does everythinginit.bat does minus autodiscovery of MOST config.

      • It still recursively updates thepath if/max_depth command line arg is greater than 1.
  • The below speeds are WITHOUT/f with/t on a virtual box vm running on an older laptop without SSD storage. Modern hardware SHOULD be even faster

  • master -------------------------->more_speed_2 - Initial Run------------------------------------>After user_init.cmd

    image

DRSDavidSoft reacted with heart emoji
@daxgamesdaxgames marked this pull request as draftFebruary 12, 2023 13:11
@daxgamesdaxgames marked this pull request as ready for reviewFebruary 12, 2023 23:10
@i-s-o
Copy link

I'm not sure if this is the best place to report this, here it goes.

When I run Cmder with this PR in a clean system (Windows Sandbox), I get an error on the invocation ofpowershell -f %cmder_root%\vendor\bin\create-cmdercfg.ps1, see below:

Initial run

 9:55:00.98 DEBUG(init.bat): Env Var - CMDER_ROOT=C:\tools\cmder-1464 9:55:00.99 DEBUG(init.bat): Env Var - debug_output=1Generating Clink initial settings in "C:\tools\cmder-1464\config\clink_settings"        1 file(s) copied.Additional *.lua files in "C:\tools\cmder-1464\config" are loaded on startup.Creating Cmder prompt config file: "C:\tools\cmder-1464\config\cmder_prompt_config.lua"        1 file(s) copied. 9:55:01.13 DEBUG(init.bat): Looking for Git install root... 9:55:01.18 DEBUG(:read_version): Env Var - git_executable=C:\tools\cmder-1464\vendor\git-for-windows\cmd\git.exe 9:55:01.37 DEBUG(:read_version): Env Var - GIT_VERSION_VENDORED=2.39.0.windows.2 9:55:01.45 DEBUG(:validate_version): ARGV[1]=VENDORED, ARGV[2]=2.39.0.windows.2 9:55:01.48 DEBUG(:parse_version): ARGV[1]=VENDORED, ARGV[2]=2.39.0.windows.2 9:55:01.52 DEBUG(:validate_version): Found Git Version for VENDORED: 2.39.0.windows.2 9:55:01.77 DEBUG(init.bat): Using vendored Git '2.39.0.windows.2'... 9:55:01.79 DEBUG(init.bat): Using Git from 'C:\tools\cmder-1464\vendor\git-for-windows... 9:55:01.82 DEBUG(init.bat): START - git.exe(prepend): Env Var - PATH=C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps; 9:55:01.87 DEBUG(init.bat): END - git.exe(prepend): Env Var - PATH=C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps; 9:55:01.92 DEBUG(init.bat): START - nix_tools(append): Env Var - PATH=C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps; 9:55:01.95 DEBUG(init.bat): END - nix_tools(append): Env Var - PATH=C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin 9:55:02.10 DEBUG(init.bat): Found Git in: 'GIT_INSTALL_ROOT=C:\tools\cmder-1464\vendor\git-for-windows' 9:55:02.12 DEBUG(init.bat): START - vendor/bin(prepend): Env Var - PATH=C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin 9:55:02.15 DEBUG(init.bat): END - vendor/bin(prepend): Env Var - PATH=C:\tools\cmder-1464\vendor\bin;C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin 9:55:02.18 DEBUG(init.bat): START - bin(prepend): Env Var - PATH=C:\tools\cmder-1464\vendor\bin;C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin 9:55:02.21 DEBUG(init.bat): END - bin(prepend): Env Var - PATH=C:\tools\cmder-1464\bin;C:\tools\cmder-1464\vendor\bin;C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin 9:55:02.24 DEBUG(init.bat): START - cmder_root(append): Env Var - PATH=C:\tools\cmder-1464\bin;C:\tools\cmder-1464\vendor\bin;C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin 9:55:02.29 DEBUG(init.bat): END - cmder_root(append): Env Var - PATH=C:\tools\cmder-1464\bin;C:\tools\cmder-1464\vendor\bin;C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin;C:\tools\cmder-1464Creating initial user_aliases store in "C:\tools\cmder-1464\config\user_aliases.cmd"...        1 file(s) copied.Running Git for Windows one time Post Install...."running post-install"'C:\Windows\system32\drivers\etc\hosts' -> '/etc/hosts''C:\Windows\system32\drivers\etc\protocol' -> '/etc/protocols''C:\Windows\system32\drivers\etc\services' -> '/etc/services''C:\Windows\system32\drivers\etc\networks' -> '/etc/networks'The batch file cannot be found. 9:55:06.34 DEBUG(init.bat): Env Var - HOME=C:\Users\WDAGUtilityAccountCreating user startup file: "C:\tools\cmder-1464\config\user_profile.cmd"        1 file(s) copied.File C:\tools\cmder-1464\vendor\bin\create-cmdercfg.ps1 cannot be loaded because running scripts is disabled on this system. Formore information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.    + CategoryInfo          : SecurityError: (:) [], ParentContainsErrorRecordException    + FullyQualifiedErrorId : UnauthorizedAccessERROR: Failed to generate Cmder configElapsed Time: 0:0:8.91 (8.91s total)C:\tools\cmder-1464λ verMicrosoft Windows [Version 10.0.19041.2486]

Second run

12:00:02.04 DEBUG(init.bat): Env Var - CMDER_ROOT=C:\tools\cmder-146412:00:02.07 DEBUG(init.bat): Env Var - debug_output=112:00:02.20 DEBUG(init.bat): Looking for Git install root...12:00:02.27 DEBUG(:read_version): Env Var - git_executable=C:\tools\cmder-1464\vendor\git-for-windows\cmd\git.exe12:00:02.42 DEBUG(:read_version): Env Var - GIT_VERSION_VENDORED=2.39.0.windows.212:00:02.48 DEBUG(:validate_version): ARGV[1]=VENDORED, ARGV[2]=2.39.0.windows.212:00:02.51 DEBUG(:parse_version): ARGV[1]=VENDORED, ARGV[2]=2.39.0.windows.212:00:02.56 DEBUG(:validate_version): Found Git Version for VENDORED: 2.39.0.windows.212:00:02.85 DEBUG(init.bat): Using vendored Git '2.39.0.windows.2'...12:00:02.88 DEBUG(init.bat): Using Git from 'C:\tools\cmder-1464\vendor\git-for-windows...12:00:02.92 DEBUG(init.bat): START - git.exe(prepend): Env Var - PATH=C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;12:00:02.95 DEBUG(init.bat): END - git.exe(prepend): Env Var - PATH=C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;12:00:02.98 DEBUG(init.bat): START - nix_tools(append): Env Var - PATH=C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;12:00:03.01 DEBUG(init.bat): END - nix_tools(append): Env Var - PATH=C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin12:00:03.17 DEBUG(init.bat): Found Git in: 'GIT_INSTALL_ROOT=C:\tools\cmder-1464\vendor\git-for-windows'12:00:03.20 DEBUG(init.bat): START - vendor/bin(prepend): Env Var - PATH=C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin12:00:03.23 DEBUG(init.bat): END - vendor/bin(prepend): Env Var - PATH=C:\tools\cmder-1464\vendor\bin;C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin12:00:03.26 DEBUG(init.bat): START - bin(prepend): Env Var - PATH=C:\tools\cmder-1464\vendor\bin;C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin12:00:03.31 DEBUG(init.bat): END - bin(prepend): Env Var - PATH=C:\tools\cmder-1464\bin;C:\tools\cmder-1464\vendor\bin;C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin12:00:03.34 DEBUG(init.bat): START - cmder_root(append): Env Var - PATH=C:\tools\cmder-1464\bin;C:\tools\cmder-1464\vendor\bin;C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin12:00:03.37 DEBUG(init.bat): END - cmder_root(append): Env Var - PATH=C:\tools\cmder-1464\bin;C:\tools\cmder-1464\vendor\bin;C:\tools\cmder-1464\vendor\git-for-windows\cmd;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu\Scripts;C:\tools\cmder-1464\vendor\conemu-maximus5;C:\tools\cmder-1464\vendor\conemu-maximus5\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\WDAGUtilityAccount\AppData\Local\Microsoft\WindowsApps;;C:\tools\cmder-1464\vendor\git-for-windows\usr\bin;C:\tools\cmder-146412:00:03.62 DEBUG(init.bat): Env Var - HOME=C:\Users\WDAGUtilityAccount12:00:03.65 DEBUG(init.bat): Calling - C:\tools\cmder-1464\config\user_profile.cmdFile C:\tools\cmder-1464\vendor\bin\create-cmdercfg.ps1 cannot be loaded because running scripts is disabled on this system. Formore information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.    + CategoryInfo          : SecurityError: (:) [], ParentContainsErrorRecordException    + FullyQualifiedErrorId : UnauthorizedAccessERROR: Failed to generate Cmder configElapsed Time: 0:0:5.42 (5.42s total)Clink v1.4.19 is available.- To apply the update, run 'clink update'.- To stop checking for updates, run 'clink set clink.autoupdate false'.- To view the release notes, visit the Releases page:  https://github.com/chrisant996/clink/releases

@daxgames
Copy link
MemberAuthor

@i-s-o Good catch. Trythis

@i-s-o
Copy link

@i-s-o Good catch. Trythis

Yes, that fixes it.

@daxgamesdaxgames mentioned this pull requestApr 9, 2023
@DRSDavidSoft
Copy link
Contributor

@daxgames Thank you for the great PR, I'm in the process of reviewing it. Excited to merge it soon!

@daxgames
Copy link
MemberAuthor

@DRSDavidSoft Hopefully it works as well for you as it has for me.

@DRSDavidSoft
Copy link
Contributor

I'm merging this in the development branch for further review. Please use the development branch as a base for any future PRs, I'll review your great changes very soon. Thank you once again! 🤝

Comment on lines 130 to 131
<valuename="ConWnd X"type="long"data="2194"/>
<valuename="ConWnd Y"type="long"data="95"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Should the starting X,Y position be changed?

@daxgames
Copy link
MemberAuthor

Why are we getting back to using a development branch we abandonded that practice years ago.

@DRSDavidSoft
Copy link
Contributor

@daxgames Good for the CI, because GitHub actions can produce compiled versions of branches. I just wanted to keep the master branch "stable" for now. When we merge development back into master eventually, they will contain the same commits. Sorry if it caused any issues

@daxgamesdaxgames changed the base branch frommaster todevelopmentJanuary 5, 2025 17:13
@daxgamesdaxgames merged commita1a6a02 intocmderdev:developmentJan 5, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@DRSDavidSoftDRSDavidSoftDRSDavidSoft left review comments

Assignees

@DRSDavidSoftDRSDavidSoft

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@daxgames@i-s-o@DRSDavidSoft

[8]ページ先頭

©2009-2025 Movatter.jp