Recent

Author Topic: outsource RTTI  (Read 1110 times)

paule32

  • Hero Member
  • *****
  • Posts: 645
  • One in all. But, not all in one.
outsource RTTI
« on: July 13, 2025, 09:45:00 am »
Hello,
by creating class's I have many VMT and other Information's in the executable Image.

In my main modules I tried:

{$TYPEINFO OFF}
{$M-}


But there was not help.
So, give it a Command Line Option to outsource the RTTI into an external File ?
« Last Edit: July 13, 2025, 09:47:08 am by paule32 »
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

jamie

  • Hero Member
  • *****
  • Posts: 7708
Re: outsource RTTI
« Reply #1 on: July 13, 2025, 04:10:48 pm »
I know you are not a native English speaker; however, there is a phrase that is used quite often here in the states and that is:

 "You are up a creek without a paddle"

 I am sure you have an equal expression in your language :D

Jamie
The only true wisdom is knowing you know nothing

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12345
  • Debugger - SynEdit - and more
    • wiki
Re: outsource RTTI
« Reply #2 on: July 13, 2025, 05:37:37 pm »
You can't get rid of all RTTI.

Any class that has a parent with $M+ / published (like TPersistent) will have RTTI -- never mind what you do in your units.
You would need to recompile all rtl/lcl sources after changing them.

Even without that:
- classname
- a few others
will always be there. No way to remove (other than modify the compiler)

Some info on enums/sets will always be included.

Info an managed types in dynarrays will be there. That is actually needed, to alloc/free mem for entries in the array.

Not sure what else...

cdbc

  • Hero Member
  • *****
  • Posts: 2787
    • http://www.cdbc.dk
Re: outsource RTTI
« Reply #3 on: July 13, 2025, 05:40:03 pm »
Hi
I asked my wife, who's born in Hamburg and she said: "There's no direct translation of - Up Shijt Creek without a paddle - in german"
<german>
Sie hat ihren leben lang in Hamburg gewohnt und ist in 2019 zu mir hier in Dänemark ausgewandert und lebt jetzt hier  8-)
</german>
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

paule32

  • Hero Member
  • *****
  • Posts: 645
  • One in all. But, not all in one.
Re: outsource RTTI
« Reply #4 on: July 13, 2025, 06:09:05 pm »
is it possible to shrink the Meta Information's with a kind of zip Stream when running the FP Compiler ?

In one of my Project I worked on, I introduce gzip -9 packed Resource Files that I outsourced to external DLL Files (mostly for Localization stuff).
After gzip, I bundle the packed Resource Files into new Resources Files.
So, I can use Windows win32api Functions and Procedures to handle Resources (after unpacking it).

This is a little bit not comfortable, because I use a Batch Script File with calling Command's on the Windows Console for each Step ... But it seems to work.
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

jamie

  • Hero Member
  • *****
  • Posts: 7708
Re: outsource RTTI
« Reply #5 on: July 13, 2025, 06:27:57 pm »
You could always try the Advanced record or older Object model to reduce that a little.

 
Jamie
The only true wisdom is knowing you know nothing

CharlyTango

  • Full Member
  • ***
  • Posts: 179
Re: outsource RTTI
« Reply #6 on: July 13, 2025, 06:55:31 pm »
Eine passende deutsche Übersetzung wäre:

"Du sitzt in der Klemme."

"Du steckst in der Patsche."

"Du bist aufgeschmissen."

"Du bist in der Tinte."
Lazarus stable, Win32/64

PascalDragon

  • Hero Member
  • *****
  • Posts: 6395
  • Compiler Developer
Re: outsource RTTI
« Reply #7 on: July 13, 2025, 07:01:34 pm »
So, give it a Command Line Option to outsource the RTTI into an external File ?

No, there is no such thing and there will be no such thing.

is it possible to shrink the Meta Information's with a kind of zip Stream when running the FP Compiler ?

No, this is not possible, because the RTL needs to be able to access the information.

The RTTI is part of FPC's language implementation of Pascal. If you don't want it, then don't use FPC.

paule32

  • Hero Member
  • *****
  • Posts: 645
  • One in all. But, not all in one.
Re: outsource RTTI
« Reply #8 on: July 13, 2025, 08:45:15 pm »
I don't would make FPC bad ...
I love FPC because it is free, and faster than GNU C/C++ Compiler (gcc / g++).
It give bottelnecks to each DSL Compilers ...

But, if I have the right Person's, FPC can a powerful Tool.
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12863
  • FPC developer.
Re: outsource RTTI
« Reply #9 on: July 13, 2025, 09:41:55 pm »
Hello,
by creating class's I have many VMT and other Information's in the executable Image.

In my main modules I tried:

{$TYPEINFO OFF}
{$M-}


But there was not help.
So, give it a Command Line Option to outsource the RTTI into an external File ?

Why don't you compile to assembler, and make a sorter yourself?

jamie

  • Hero Member
  • *****
  • Posts: 7708
Re: outsource RTTI
« Reply #10 on: July 13, 2025, 09:59:01 pm »
Hex entry keypad or at least a Machine language monitor to poke around in memory. :(
The only true wisdom is knowing you know nothing

paule32

  • Hero Member
  • *****
  • Posts: 645
  • One in all. But, not all in one.
Re: outsource RTTI
« Reply #11 on: July 14, 2025, 04:22:43 am »
@marcov:

good Idea ...

me:
- I am come from Delphi and C++ Builder Line ...
- was migrating to FPC only few month ago ...
- lazy a little bit to do test practisim on the Posibilities of FPC ...
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

 

TinyPortal © 2005-2018