Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-12691

[PATCH] reduce the high memory consumption of the ShellDimScreen implementation

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 72,573

    Description

      As I already mentioned in CORE-11422 we lost around 300kiloByte memory after bootup due to the introduction of ShellDimScreen in r72572 + r72573. It was not the implementation itself that caused this high jump, but the introduction of ATL into msgina. We loose this memory permanent (even before ShellDimScreen gets called). Therefore I put a week of work into porting it from ATL to plain C - same as msgina was before that commit, but still with a properly working ShellDimScreen.

      Gain for gcc dbg I18N_LANG=de-DE based on r73557:
      -300KB less memory after booting up the shell!
      -iso filesize reduces a bit from 88.719.360 to 88.668.160
      -msgina file-size drops from 388.096bytes to 301.056bytes -> only 78%

      For stepwise review/comparison I decided to add 3 files here additionally:
      0dimmedwindow-r73557.cpp point from where I started my work
      1dimmedwindow-logicalChangesAndPorting.c
      2dimmedwindow-Final_variableRenaming_and_indentation.c

      And of course:
      final.patch

      For tests:
      msgina-r73557-gcc-dbg-I18Nger-original.dll
      msgina-r73557-gcc-dbg-I18Nger-patched.dll

      That said: I love ShellDimScreen - I just love it even more when it's efficient.

      Attachments

        1. 0dimmedwindow-r73557.cpp
          8 kB
          reactosfanboy
        2. 1dimmedwindow-logicalChangesAndPorting.c
          7 kB
          reactosfanboy
        3. 2dimmedwindow-Final_variableRenaming_and_indentation.c
          6 kB
          reactosfanboy
        4. final.patch
          16 kB
          reactosfanboy
        5. msgina-r73557-gcc-dbg-I18Nger-original.dll
          379 kB
          reactosfanboy
        6. msgina-r73557-gcc-dbg-I18Nger-patched.dll
          294 kB
          reactosfanboy

        Issue Links

          Activity

            People

              bug zilla Bug Zilla
              reactosfanboy reactosfanboy
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: