Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Grosse Exe-Dateien per Delphi... (https://www.delphipraxis.net/158536-grosse-exe-dateien-per-delphi.html)

turboPASCAL 21. Feb 2011 15:42


Grosse Exe-Dateien per Delphi...
 
Liste der Anhänge anzeigen (Anzahl: 1)
Hi,

ich muss nun doch mal fragen, soll ja nix kosten... ;)

Ich habe Ein kleines Delphiprojekt mit zwei Panels, ein Edit so wie ein Memo und einige Buttons.
Mit Delphi 6 kommt man auf eine Grösse von rund 575 kBytes. Bei Delphi XE SE verdoppelt sich die
Grösse des Kompilates auf rund 1.115.000 Bytes also 1 MB.
Kann man daran etwas ändern oder ist das normal ?


Ich stell mir gerade vor dass dann in 5 Jahren eine "Hellow World" - App ~ 10 MB beansprucht...
Delphi-Quellcode:
program Hello_World;

uses
  Windows;

begin
  MessageBox(0, 'Hellow World !', nil, MB_ICONINFORMATION);
end.

himitsu 21. Feb 2011 15:52

AW: Grosse Exe-Dateien per Delphi...
 
Hast du die Debuginformationen angeschaltet/eingebunden?


Das ist normal (seit Unicode sind einige neue Ressourcen reingekommen, wie z.B. daten über die Regionen/Bereiche der Zeichen im Unicode.
Auch sind die Codes der RTL/VCL größer/umfangreicher geworden usw.

PS: packe mal sowas wie DevExpress (vorallem das Skinning-Zeugs) auf deine Form, schon stören dich die paar Bytes der VCL/RTL nicht mehr. :stupid:

s.h.a.r.k 21. Feb 2011 16:01

AW: Grosse Exe-Dateien per Delphi...
 
Gabs da nicht schon viele andere Threads drüber? Das neue RTTI macht hier scheinbar auch ein wenig was aus, so weit ich mich noch erinnern kann. Aber was sind heute schon 1MB mehr oder weniger?

Namenloser 21. Feb 2011 16:04

AW: Grosse Exe-Dateien per Delphi...
 
Hast du alle Debug-Infos abgeschaltet? Achja, und ab D2010 gibt es ja noch diese erweiterte RTTI. Ich weiß aber nicht, ob sich die deaktivieren lässt. Du könntest sonst höchstens noch stripreloc drüberlaufen lassen, das bringt vielleicht ein paar kb.

turboPASCAL 21. Feb 2011 16:09

AW: Grosse Exe-Dateien per Delphi...
 
Zitat:

Zitat von himitsu (Beitrag 1083239)
Hast du die Debuginformationen angeschaltet/eingebunden?

Jupp. Buildkonfig. "Release"


Zitat:

Zitat von himitsu (Beitrag 1083239)
Das ist normal (seit Unicode sind einige neue Ressourcen reingekommen, wie z.B. daten über die Regionen/Bereiche der Zeichen im Unicode. Auch sind die Codes der RTL/VCL größer/umfangreicher geworden usw.

Doofes Unicode. :stupid:

Zitat:

Zitat von himitsu (Beitrag 1083239)
PS: packe mal sowas wie DevExpress (vorallem das Skinning-Zeugs) auf deine Form, schon stören dich die paar Bytes der VCL/RTL nicht mehr. :stupid:

DevExpress (und das Skinning-Zeugs) hab ich ned und will ich auch nicht.
Kann aber ein unkomprimiertes Bitmap auf die Form pappen für die Augenwischerrei. :mrgreen:

Assarbad 21. Feb 2011 16:17

AW: Grosse Exe-Dateien per Delphi...
 
Zitat:

Zitat von turboPASCAL (Beitrag 1083237)
Mit Delphi 6 kommt man auf eine Grösse von rund 575 Bytes. Bei Delphi XE SE verdoppelt sich die Grösse des Kompilates auf rund 1.115.000 Bytes also 1 MB.

Verdoppelt sich? :gruebel:

:mrgreen:

Immer diese Nörgler. Geh doch in das Thema hier :zwinker:

Aber mal ernsthaft. MessageBox ist eine Win32-Funktion, weshalb ich hier keine Größe jenseits der 100 KiB erwarten würde.

himitsu 21. Feb 2011 16:28

AW: Grosse Exe-Dateien per Delphi...
 
PS:
Ein einfaches Delphi XP-Standard-VCL-Projekt ist bei mir 897 KB klein.
Ein Programm wie das da oben nimmt immernoch 26,5 KB ein, sowohl als Release- oder als Debug-Version.

Assarbad 21. Feb 2011 16:30

AW: Grosse Exe-Dateien per Delphi...
 
Vielleicht ist die Minimalgröße von 1 MiB ja auch ein Fietscher der SE?! :zwinker:

himitsu 21. Feb 2011 16:32

AW: Grosse Exe-Dateien per Delphi...
 
Der Nachhausetelefonierentrackingcode?

Assarbad 21. Feb 2011 16:33

AW: Grosse Exe-Dateien per Delphi...
 
Zitat:

Zitat von himitsu (Beitrag 1083255)
Der Nachhausetelefonierentrackingcode?

Kein Kommentar, sonst bekomm ich von den Mods eins auf den Deckel.

@turboPASCAL: schick doch mal die .exe oder häng sie an. Guck ich mal in IDA drüber was für Code da alles referenziert wird ...

turboPASCAL 21. Feb 2011 16:45

AW: Grosse Exe-Dateien per Delphi...
 
Liste der Anhänge anzeigen (Anzahl: 1)
Zitat:

Zitat von Assarbad (Beitrag 1083256)
@turboPASCAL: schick doch mal die .exe oder häng sie an. Guck ich mal in IDA drüber was für Code da alles referenziert wird ...

Bitteschön.

Ist ein Steinaltes Projekt von 2008, "Aufpoliert und Modernisiert".
Das Teil legt eine Ini im selben Pfad wie die Exe an.

Assarbad 21. Feb 2011 17:16

AW: Grosse Exe-Dateien per Delphi...
 
Zitat:

Zitat von turboPASCAL (Beitrag 1083259)
Zitat:

Zitat von Assarbad (Beitrag 1083256)
@turboPASCAL: schick doch mal die .exe oder häng sie an. Guck ich mal in IDA drüber was für Code da alles referenziert wird ...

Bitteschön.

Danke. Meinte aber eigentlich die mit nur dem Aufruf von MSDN-Library durchsuchenMessageBox welche trotzdem 1 MiB groß sein soll. Gruß.

turboPASCAL 21. Feb 2011 18:41

AW: Grosse Exe-Dateien per Delphi...
 
Nein, ich bezog mich auf die App., das mit der Messagebox ist ja nur ein Beispiel gewesen. Siehe Beitrag #1 unterer Teil. ;)

AScomp 21. Feb 2011 19:58

AW: Grosse Exe-Dateien per Delphi...
 
Selbes Problem bei mir:

Programm mit einem Button unter Delphi 2009: 500 KB. Unter Delphi XE: 1305 KB.

RTTI deaktiviert, ergibt eine Reduktion um 100 KB. Alles auf Release geschaltet, keine Debug-Informationen etc.

Assarbad 21. Feb 2011 20:06

AW: Grosse Exe-Dateien per Delphi...
 
Zitat:

Zitat von turboPASCAL (Beitrag 1083286)
Nein, ich bezog mich auf die App., das mit der Messagebox ist ja nur ein Beispiel gewesen. Siehe Beitrag #1 unterer Teil. ;)

Fair enough.

Die Ressourcen sind in der Tat ziemlich groß. Und was mir bei Delphi/CB-EXEn immer wieder auffällt ist diese fragmentierte Importtabelle. Kann es einfach nicht nachvollziehen, daß dort immer wieder Importe mehrfach auftauchen.

Aber das eigentlich große scheinen die ganzen Units zu sein. Das Smart-Linking ist nämlich nicht immer so schlau wie der Name vorgibt.

Code:
Package Info

  Never Build:            No
  Design Time Only:       No
  Runtime Only:           No
  Check for Duplicates:   No
  Environment:            Delphi
  Module Type:            Unknown

Unit Info

  UPXGui:                 Main Unit
  TpcShrd:                $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  Windows:                $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  Types:                  Implicitly Imported
  SysInit:                
  System:                
  Imm:                    $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  WideStrUtils:           Implicitly Imported
  Classes:                Implicitly Imported
  SysConst:               Implicitly Imported
  RTLConsts:              Implicitly Imported
  Character:              Implicitly Imported
  SysUtils:               Implicitly Imported
  ExcUtils:               Implicitly Imported
  PsAPI:                  $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  SHFolder:               Implicitly Imported
  ImageHlp:               Implicitly Imported
  TypInfo:                Implicitly Imported
  Variants:               Implicitly Imported
  VarUtils:               Implicitly Imported
  ActiveX:                Implicitly Imported
  Messages:               $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  Dlgs:                   $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  MultiMon:               Implicitly Imported
  RichEdit:               $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  ToolWin:                Implicitly Imported
  Graphics:               Implicitly Imported
  Consts:                 Implicitly Imported
  Registry:               Implicitly Imported
  IniFiles:               Implicitly Imported
  IOUtils:                Implicitly Imported
  Math:                   Implicitly Imported
  Masks:                  Implicitly Imported
  DateUtils:              Implicitly Imported
  Generics.Defaults:      Implicitly Imported
  Generics.Collections:   Implicitly Imported
  SyncObjs:               Implicitly Imported
  Diagnostics:            Implicitly Imported
  TimeSpan:               Implicitly Imported
  AnsiStrings:            Implicitly Imported
  StrUtils:               Implicitly Imported
  Wincodec:               Implicitly Imported
  Forms:                  
  UxTheme:                Implicitly Imported
  CommCtrl:               $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  Themes:                 Implicitly Imported
  Controls:               Implicitly Imported
  Dwmapi:                 $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  ActnList:               Implicitly Imported
  Menus:                  Implicitly Imported
  ImgList:                Implicitly Imported
  Contnrs:                Implicitly Imported
  StdActns:               Implicitly Imported
  ComCtrls:               Implicitly Imported
  CommDlg:                $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  ShlObj:                 $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  StructuredQueryCondition:$WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  PropSys:                $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  ObjectArray:            $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  UrlMon:                 $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  WinInet:                $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  RegStr:                 $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  ShellAPI:               $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  ComStrs:                Implicitly Imported
  Printers:               Implicitly Imported
  WinSpool:               $WEAKPACKAGEUNIT Unit, Original Containment of $WEAKPACKAGEUNIT Unit, Implicitly Imported
  GraphUtil:              Implicitly Imported
  ZLib:                   Implicitly Imported
  ListActns:              Implicitly Imported
  StdCtrls:               Implicitly Imported
  ExtCtrls:               Implicitly Imported
  Dialogs:                Implicitly Imported
  HelpIntfs:              Implicitly Imported
  Clipbrd:                Implicitly Imported
  FlatSB:                 Implicitly Imported
  pngimage:               Implicitly Imported
  pnglang:                Implicitly Imported
  uUPXGui:

jbg 21. Feb 2011 20:49

AW: Grosse Exe-Dateien per Delphi...
 
Zitat:

Zitat von AScomp (Beitrag 1083308)
RTTI deaktiviert, ergibt eine Reduktion um 100 KB.

Das tolle 256x256x16M Standard-MainIcon macht auch noch mal knappe 100 KB aus.

AScomp 21. Feb 2011 21:00

AW: Grosse Exe-Dateien per Delphi...
 
Zitat:

Zitat von jbg (Beitrag 1083317)
Zitat:

Zitat von AScomp (Beitrag 1083308)
RTTI deaktiviert, ergibt eine Reduktion um 100 KB.

Das tolle 256x256x16M Standard-MainIcon macht auch noch mal knappe 100 KB aus.

Ich frag mich nur, wo die übrigen 500 KB herkommen (im Vergleich zu D2009).

turboPASCAL 21. Feb 2011 21:28

AW: Grosse Exe-Dateien per Delphi...
 
Zitat:

Zitat von jbg (Beitrag 1083317)
Zitat:

Zitat von AScomp (Beitrag 1083308)
RTTI deaktiviert, ergibt eine Reduktion um 100 KB.

Das tolle 256x256x16M Standard-MainIcon macht auch noch mal knappe 100 KB aus.

Ja, das 256x256x16M Icon hatte ich vergessen herauszunehmen. Das sind aber auch nur 22kB weniger. ;)

Luckie 21. Feb 2011 21:32

AW: Grosse Exe-Dateien per Delphi...
 
Und was ist mit den anderen grafischen Ressourcen, die immer eingebunden werden? Sind die, im Vergleich zu älteren Delphi Versionen, auch größer geworden?

mquadrat 22. Feb 2011 14:28

AW: Grosse Exe-Dateien per Delphi...
 
Aus Interesse gerade mal ausprobiert. Aus einer 8 MB EXE mit D2007 wurden mit DXE 11 MB. Aus einer 15,5MB EXE mit D2007 wurden mit DXE 22MB...

himitsu 22. Feb 2011 15:06

AW: Grosse Exe-Dateien per Delphi...
 
Nur einmal kurz DevExpress auf die Form gezogen und gleich wieder gelöscht ... schon wird aus einer 3 MB Datei gleich mal eine 16 MB Datei.

Also sooo schlimm ist Delphi da nun auch nicht.

AScomp 22. Feb 2011 16:32

AW: Grosse Exe-Dateien per Delphi...
 
Was hat das jetzt mit DevExpress zu tun?

Fakt ist, dass eine leere Delphi-EXE (VCL) jetzt schon 1,3 MB groß ist. Unsere Programme bekommen automatisch bei Kompilierung unter Delphi XE statt unter Delphi 2009 ca. 1-1,1 MB Overhead zusätzlich.

Man mag jetzt sagen, dass dies im Zeitalter von DSL doch egal ist. Aber es gibt noch immer Kunden ohne DSL-Anschluss, und der Speicherplatz auf Heft-CD von PC-Magazinen wird auch nach MB abgerechnet. Jedes einzelne zusätzliche MB kostet da also richtig Asche.

himitsu 22. Feb 2011 17:42

AW: Grosse Exe-Dateien per Delphi...
 
Zitat:

Zitat von AScomp (Beitrag 1083567)
Fakt ist, dass eine leere Delphi-EXE (VCL) jetzt schon 1,3 MB groß ist.

Fakt ist, daß sie standardmäßig nur 900 KB ist.

http://www.delphipraxis.net/1083252-post7.html



Und ich wollte nur ausdrücken, daß Anderes viel schlimmer ist und die paar Byte vom Delphi dagegen kaum stören. :stupid:

WM_CLOSE 22. Feb 2011 17:57

AW: Grosse Exe-Dateien per Delphi...
 
Bei Google suchenupx?

Assarbad 22. Feb 2011 18:02

AW: Grosse Exe-Dateien per Delphi...
 
Zitat:

Zitat von WM_CLOSE (Beitrag 1083614)

Mag bei .exe-Dateien noch sinnvoll sein, ist bei .dll-Dateien aber bspw. wieder Blödsinn. Auch wenn es nach wie vor von vielen dennoch auch bei DLLs angewandt wird (und da ja nicht nur UPX).

AScomp 22. Feb 2011 19:03

AW: Grosse Exe-Dateien per Delphi...
 
Zitat:

Zitat von himitsu (Beitrag 1083609)
Zitat:

Zitat von AScomp (Beitrag 1083567)
Fakt ist, dass eine leere Delphi-EXE (VCL) jetzt schon 1,3 MB groß ist.

Fakt ist, daß sie standardmäßig nur 900 KB ist.

http://www.delphipraxis.net/1083252-post7.html

Und ich wollte nur ausdrücken, daß Anderes viel schlimmer ist und die paar Byte vom Delphi dagegen kaum stören. :stupid:

Bei mir ist sie 1,3 MB groß. Debug-Informationen bereits ausgeschlossen.

Das ist ja schön, wenn es dich nicht stört - aber wie du siehst, stört es andere. :wink:


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:40 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz