Slow Perfomance of Console (WEC7 V1.4 and later)

We face a problem with image version V1.5, because the console output performance is very slow when we open the cmd shell from the start menu and work with the console, e.g. executing a dir command.
When I use TaskManager (PerformanceMonitor) while executing the dir command there is a CPU usage of approximately 33 % from udevice shown.
With the imager version 1.2 we used so far console output was fast.

I remember that we experienced a similar problem with image version 1.1. Therefore I tested a few image versions and it seems that 1.2 and 1.3 is fine but 1.4 and 1.5 has the console output performance problem.

The problem really slows down all handling with the device if a cmd line program is outputting something.

In general the Windows CE console application was not implemented by Microsoft in a way which is not optimized for performance.

The iMX6 images V1.3 and older had a serious bug in the caching algorithms which could lead to inconsistencies of memory content. We had to insert a fix for this problem by doing additional cash-flush operations. For most applications this has a minimal impact on the performance, but we also observed that the console performance suffered significantly by this change.
Unfortunately there is no simple way to increase the performance of the console application itself.

What you could do is work around this problem, for example:

  • Output debug messages to the debug port instead of the console (using NKDbgPrintfW() or RETAILMSG() instead of printf()
  • Open a Telnet session instead of the Console. If you run your application from the telnet session, all output will be routed to the telnet terminal, instead of the console, which is much faster.
    There are also Telnet clients for WinCe available (e.g. Putty), so you can even do it on the target, without a physical Ethernet connection.

Regards, Andy