{"id":735,"date":"2011-10-04T06:00:52","date_gmt":"2011-10-04T00:30:52","guid":{"rendered":"http:\/\/www.e-consystems.com\/blog\/windowsce\/?p=735"},"modified":"2023-08-15T12:31:28","modified_gmt":"2023-08-15T07:01:28","slug":"windows-ce-6-0-windows-embedded-compact-7-0-image-size-comparisons","status":"publish","type":"post","link":"https:\/\/www.e-consystems.com\/blog\/windowsce\/windows-ce-6-0-windows-embedded-compact-7-0-image-size-comparisons\/","title":{"rendered":"WinCE 6.0 &#038; WinCE 7.0: Image Size Comparisons"},"content":{"rendered":"<p>As I started to look into the differences, the first thing that struck me was the image size. I was really seeing something drastically different in the image size when I compared the Windows CE 6.0 image of the <a title=\"PXA300 Reference platform\" href=\"https:\/\/www.e-consystems.com\/iMX6-development-board.asp\" target=\"_blank\" rel=\"noopener\">Alioth<\/a> platform and the <strong>Windows Embedded Compact 7.0<\/strong> of Alioth.<\/p>\n<p>I created an OSDesign with selected components (not exactly minimum) for a GUI based build, in my <a title=\"PXA300 Reference platform\" href=\"https:\/\/www.e-consystems.com\/iMX6-development-board.asp\" target=\"_blank\" rel=\"noopener\">Alioth<\/a> platform in CE 6.0. The \u201cRelease\u201d Image size was around 8.5MB. I booted up the OS and checked to find everything working as expected. A cool GUI based build in 8.5 MB without any effort to optimize it..Hmmm..Sounds good..<\/p>\n<p>Then I moved on to my <strong>WEC 7<\/strong> development platform and built an exact replica of the features with WEC7 BSP for <a title=\"PXA300 Reference platform\" href=\"https:\/\/www.e-consystems.com\/iMX6-development-board.asp\" target=\"_blank\" rel=\"noopener\">Alioth<\/a>. The \u201cRelease\u201d Image size was around 25MB. Wow that was some 300% more of binary size&#8230;<\/p>\n<p>This sounded strange. How could the same set of features create a 300% increase? I started to explore and found a few things which I am sharing in this blog.<\/p>\n<h2><span style=\"color: #003366;\"><strong>Dependencies <\/strong><\/span><\/h2>\n<p>As you all know Windows CE has a lot of inter-related dependencies and components keep piling up as dependencies add up as a chain. Well that\u2019s what we used to face with Windows CE 6.0 as well. Yet&#8230; the size was never got that big for WinCE 6.0. So checked the dependencies of individual components one by one for both Windows CE 6.0 and <strong>WEC 7.0<\/strong><\/p>\n<p>There were 2 main components that were having a number of dependencies<\/p>\n<ol>\n<li>ActiveSync<\/li>\n<li>Standard Shell<\/li>\n<\/ol>\n<p>I had included the ActiveSync for my connectivity and debugging and Standard Shell for the base GUI and Desktop.<\/p>\n<p>The <strong>Standard Shell<\/strong> seemed to have the most dependencies. And many dependencies did not crop up with the WCE 6.0 image that I built. I am presenting the snapshot of the WEC 7 dependencies for you to have a look. It is marked for your convenience, to spot the new dependencies that cropped up with WEC7.<\/p>\n<p><a href=\"https:\/\/www.e-consystems.com\/images\/blog\/WEC7-Image-size-img1.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter\" title=\"WEC7\" src=\"https:\/\/www.e-consystems.com\/images\/blog\/WEC7-Image-size-img1.jpg\" alt=\"\" width=\"574\" height=\"360\" \/><\/a><\/p>\n<p>The new modules that I see on the dependency list, most of them point towards the Internet Explorer, Windows Internet Services and Cryptography (again because IPsec??).<\/p>\n<p><strong>Ieframe.dll<\/strong> occupies some 1.3 MB of space in the image. It seems to hold the user interface and window of IE in Internet Explorer 7, if I go by what the architecture of IE7 says. Why is the User Interface of Internet Explorer required when I have chosen only the standard shell and have not selected the Internet Explorer at all? I don\u2019t think I have a clear answer or logic behind this as of now.<\/p>\n<p>There are a host of Dlls, like the wininet, rpcrt4.dll, etc. which all have been included to support the<strong> \u201cinternet\u201d<\/strong>.<br \/>\nAll these Dlls (marked in my picture above) comes closely to<strong> 5MB<\/strong> of my image space.<br \/>\nWEC 7 forces to include the internet and IE related components even if I just enable the standard shell why is that? This was not the case with Windows CE 6.0<\/p>\n<p>Apart from the size, does including these components have an effect on the security or performance? Let me delve more into this and see if I can come with another blog.<\/p>\n<p>The ActiveSync has some dependencies ()as well. Some notable dependencies are<br \/>\nWindows Codecs \u2013 windowscodecs.dll \u2013 1 MB<br \/>\nXML MIME Viewer, XQL, XSLT, etc \u2013 msxml3.dll ~ 1 MB<br \/>\nsyncmanager.dll ~ 1MB<br \/>\nDatabase &#8211; Sqlcese35.sys.dll \u2013 0.5MB<\/p>\n<p>There are a host of other small components which all add up to the size as a whole. The ones mentioned above are the big ones and some seem out of place, especially the \u201cWindows Codecs\u201d. Why should be a dependency for ActiveSync?<\/p>\n<p>Stripping the image of the Standard Shell and Active Sync brought the image down to <strong>8.5 M<\/strong>B. That was a reduction of around <strong>14.5 MB<\/strong>.<\/p>\n<p>A table of the size comparisons is presented below for reference and comparison.<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\" width=\"632\">\n<tbody>\n<tr>\n<td width=\"30\" height=\"45\" align=\"center\" valign=\"middle\" bgcolor=\"#666666\"><strong><span style=\"color: #ffffff;\">Sl No<\/span><\/strong><\/td>\n<td width=\"300\" height=\"45\" align=\"center\" valign=\"middle\" bgcolor=\"#666666\"><strong><span style=\"color: #ffffff;\">Build \u2013 Components Included<\/span><\/strong><\/td>\n<td width=\"138\" height=\"45\" align=\"center\" valign=\"middle\" bgcolor=\"#666666\"><strong><span style=\"color: #ffffff;\">Windows Embedded CE 6<\/span><\/strong><\/td>\n<td width=\"138\" height=\"45\" align=\"center\" valign=\"middle\" bgcolor=\"#666666\"><strong><span style=\"color: #ffffff;\">Windows Embedded Compact 7<\/span><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"30\" height=\"25\" align=\"center\" valign=\"middle\" bgcolor=\"#666666\"><strong><span style=\"color: #ffffff;\">1<\/span><\/strong><\/td>\n<td width=\"300\" height=\"25\" valign=\"middle\">Minimal build with Standard Shell &amp; Active Sync<\/td>\n<td width=\"138\" height=\"25\" align=\"center\" valign=\"middle\">8.5 MB<\/td>\n<td width=\"138\" height=\"25\" align=\"center\" valign=\"middle\">25.0 MB<\/td>\n<\/tr>\n<tr>\n<td width=\"30\" height=\"25\" align=\"center\" valign=\"middle\" bgcolor=\"#666666\"><strong><span style=\"color: #ffffff;\">2<\/span><\/strong><\/td>\n<td width=\"300\" height=\"25\" valign=\"middle\" bgcolor=\"#FFFFFF\">Minimal build with\u00a0Standard Shell<\/td>\n<td width=\"138\" height=\"25\" align=\"center\" valign=\"middle\">7.5 MB<\/td>\n<td width=\"138\" height=\"25\" align=\"center\" valign=\"middle\">18.2 MB<\/td>\n<\/tr>\n<tr>\n<td width=\"30\" height=\"25\" align=\"center\" valign=\"middle\" bgcolor=\"#666666\"><strong><span style=\"color: #ffffff;\">3<\/span><\/strong><\/td>\n<td width=\"300\" height=\"25\" valign=\"middle\">Minimal build (No shell and No Active Sync)<\/td>\n<td width=\"138\" height=\"25\" align=\"center\" valign=\"middle\">4.9 MB<\/td>\n<td width=\"138\" height=\"25\" align=\"center\" valign=\"middle\">8.5 MB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #003366;\">General Increase in Size of Dlls<\/span><\/h2>\n<p>While the NEW dependencies introduced in the WEC 7 contribute for one bulk of size increase, there are other factors like the size of the common dlls have gone up to an extent as well.<\/p>\n<p>The common libraries like gwes.dll, coredll.dll, kernel.dll, commctrl.dll, etc. have gone up by 20 \u2013 25% size. Ofcourse, WEC 7 has improved features and so the mild increase in size of these dlls is acceptable.<\/p>\n<p>Likewise, the driver dlls that we build for our board also go up by some 10 \u2013 20%, again owing to changes in WEC7.<\/p>\n<p>I also read this post on the msdn forums<br \/>\n<a href=\"http:\/\/social.msdn.microsoft.com\/Forums\/en\/winembplatdev\/thread\/fb95d3cb-ceb1-48db-befc-9c154dd0a1a6\">http:\/\/social.msdn.microsoft.com\/Forums\/en\/winembplatdev\/thread\/fb95d3cb-ceb1-48db-befc-9c154dd0a1a6<\/a><\/p>\n<p>They say, the default page alignment size is 4KB in WEC7 and not 512 bytes. Some of the MVPs have already taken this size issues up with the Windows CE Core team and hoping for some solution on this.<\/p>\n<p>However, more than default page alignment size, the thing that causes concern with WEC 7 size increase is the <strong>forced dependencies<\/strong> for common features like Standard Shell and Active Sync.<\/p>\n<p>\u201cWhen I build an embedded device, I would like to build things from scratch including\/excluding each component voluntarily (fully knowing what its impacts are) rather than include some components just for the sake of DEPENDENCY&#8230;\u201d \u2013<\/p>\n<p>Is there anyone from Windows Embedded Community who knows why these dependencies came to be part of the WEC7?  \u2026 And throw some more light on this topic.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I started to look into the differences, the first thing that struck me was&#8230;<\/p>\n","protected":false},"author":16,"featured_media":1391,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[105,93],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/posts\/735"}],"collection":[{"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/comments?post=735"}],"version-history":[{"count":25,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/posts\/735\/revisions"}],"predecessor-version":[{"id":2038,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/posts\/735\/revisions\/2038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/media\/1391"}],"wp:attachment":[{"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/media?parent=735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/categories?post=735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/windowsce\/wp-json\/wp\/v2\/tags?post=735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}