Skip to content

[Question] Executing printf command is very slow #3017

Description

@jnambo

Version Information

Cmder version: Version 1.3.25.328
Operating system: 
Edition Windows 11 Pro
Version: 23H2
Processor: 13th Gen Intel(R) Core(TM) i9-13950HX   2.20 GHz
Installed RAM: 64.0 GB (63.7 GB usable)

Cmder Edition

Cmder Full (with Git)

Description of the issue

cmder take around 2 to 3 senconds to execute the printf command see the screenshot and the log file taken from debug feature:

Image

cmder debug.csv

How to reproduce

I have a batch script that prints valid custom "profiles" that I created for my work. It took a lot of time to print the whole table. I can share with you an example.

`@echo off
setlocal
call colors.bat

ECHO.
printf "%IPurple%Valid Profiles are:%Full_Color_Reset%"
ECHO.
printf "-----------------------------------------------\n"
printf "|     Profile     |          Proyect          |\n"
printf "-----------------------------------------------\n"
printf "|LRD ------------> L. & R. Distributors, Inc  |\n"
printf "|etrain ---------> Dematic's Etrain           |\n"
printf "|ELI-LILLY-CON---> Elli Lilly Concord         |\n"
printf "|Eli-Lilly-RTP --> Elli Lilly RTP             |\n"
printf "|Eli-Lilly-IDAP -> Elli Lilly Indianapolis    |\n"
printf "|ACE ------------> ACE Hardware               |\n"
printf "|GRI ------------> Groupe Robert Inc.         |\n"
printf "|loblaw ---------> Loblaw.                    |\n"
printf "|AMC ------------> Americold.                 |\n"
printf "|CE -------------> Cooper Electric.           |\n"
printf "|CEMD -----------> Capital Electric MD.       |\n"
printf "|NC -------------> North Coast.               |\n"
printf "|HH -------------> Home Hardware.             |\n"
printf "-----------------------------------------------\n"
ECHO.
printf "%IYellow%example:%Full_Color_Reset%"
ECHO.
rem // Store current code page in a variable for later restore (optional):
for /F "tokens=2 delims=:" %%C in ('chcp') do set /A "$CP=%%C"
rem // Change code page to UTF-8 Unicode:
chcp 65001 > nul
printf "%IWhite%λ%Full_Color_Reset% switchCmderProfile GRI"
rem // Restore original code page (optional):
chcp %$CP% > nul
ECHO.

endlocal`

Additional context

This started to happen suddenly, this problem started a couple of weeks ago, the terminal is executed with admin rights all the time

Checklist

  • I have read the documentation.
  • I have searched for similar issues and found none that describe my issue.
  • I have reproduced the issue on the latest version of Cmder.
  • I am certain my issues are not related to ConEmu, Clink, or other third-party tools that Cmder uses.

Activity

  1. daxgames commented on Aug 15, 2025

    @daxgames
    Member

    Whats wrong with echo?

    This is not a Cmder bug.

  2. chrisant996 commented on Aug 15, 2025

    @chrisant996
    Contributor

    @jnambo printf is some kind of external program.

    The issue is either with printf or maybe with ConEmu, but the issue is not related to Cmder.

    Most likely one of the following has happened, and these are things you could investigate:

    1. Maybe there's been a change in the printf program.
    2. Maybe an antivirus system is taking longer than usual to analyze whether printf is safe to run.
  3. jnambo commented on Oct 22, 2025

    @jnambo
    Author

    printf comes with cmder. Where or how can I check if there is an update for this third-party software?

  4. chrisant996 commented on Oct 22, 2025

    @chrisant996
    Contributor

    Running where printf shows it's part of Git.

  5. changed the title [-][Bug] cmder executes printf function very slow[/-] [+][Question] Executing `printf` command is very slow[/+] on Nov 7, 2025
  6. DRSDavidSoft commented on Nov 7, 2025

    @DRSDavidSoft
    Contributor

    @jnambo Please try this in Windows Terminal (both with Cmder loaded, and without) to see if eliminating ConEmu from the equation makes a difference.

    Please post responses here. Do you need any guides to setup WT?

  7. j-nambo commented on Nov 7, 2025

    @j-nambo

    Hi @DRSDavidSoft I have tested it with Windows "command prompt", it is slow as well, no CMDER was involved, so it is a library or something, I am not an expert on development prompts. I don't know how to trace loge execution as I did for cmder to get the time it takes to execute the printf command in Windows "CMD" prompt.

    I wish to know where this command comes from :( or how to get updates for these libraries :(

  8. DRSDavidSoft commented on Nov 7, 2025

    @DRSDavidSoft
    Contributor

    @j-nambo No worries, hopefully we'll be able to help you.

    For now, the first step was to confirm this wasn't a Cmder issue. I'll move this to the discussion section (https://github.com/cmderdev/cmder/discussions) so we could hopefully identify and resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions