GLBasic forum

Other languages => GLBasic - de => Topic started by: S.O.P.M. on 2014-Jun-22

Title: Compilierungs-Geschwindigkeit Vergleiche
Post by: S.O.P.M. on 2014-Jun-22
Hallo,

mich beschäftigt zur Zeit dieses Thema, da mein Rechner, der ja alles andere als High-End ist, da keine Geschwindigkeitswunder vollbringen kann. Wie schnell compiliert GLBasic bei euch? Als aktuelles Beispiel habe ich mein Projekt, welches derzeit rund 2500 Befehle umfasst. Die Erstcompilierung dauert rund 18 Sekunden, was in meinen Augen schon recht viel ist. Diese Zeit kann einem schon lang vorkommen, wenn man davor sitzt und wartet.

Daher würde mich sehr interessieren, wie lange das Compilieren bei euch so dauert. Bitte testet das mal und schreibt eure Werte hier rein. Auch bitte die verwendete Hardware, falls sie nicht schon in der Signatur steht.

@Schranz0r: gerade bei deiner Hardware würden mich die Zeiten interessieren um mal einen Vergleich zu haben, was noch so gehen könnte.

Ich selbst werde mir sobald keinen neuen Rechner zulegen, weil sich das nur für GLBasic nicht lohnt. An aktuellen, ja selbst älteren, 3D-Spielen bin ich gar nicht interessiert. Aber für einen i5 Prozessor in Kombination mit einer SSD kommen mir meine Zeiten etwas lang vor. Zum Vergleich: vergleichbare große Projekte in PureBasic brauchten nur einen Bruchteil der Zeit zum compilieren. Hm...
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: Schranz0r on 2014-Jun-22
Hi,

Du kannst mir gerne mal genau dieses Projekt zukommen lassen ( PM ). Dann hast du nen sauberen Vergleich!
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: S.O.P.M. on 2014-Jun-22
Das geht leider nicht, wenn du verstehst ;) Kommt auch nicht auf den exakten Vergleich an. Einfach mal eines deiner größeren Projekte nehmen und die Zeit nennen, das würde mir schon helfen.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: kanonet on 2014-Jun-23
Laut GPC: 2452 commands, wobei das Projekt auch noch einigen C++ Code enthält, der ja vom GPC nicht mitgezählt wird: 10,5-11,4 Sekunden bei Erstkompilierung im Debug-Modus, im Release-Modus sind es 6,5-8,1 Sekunden. Rechner siehe Signatur.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: Schranz0r on 2014-Jun-23
Alles klar, teste ich sobald ich Daheim bin.


EDIT:

Das DDGui in den Samples-Ordner:

Code (glbasic) Select
_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:cef93a50 - 3D, NET
Wordcount:3982 commands
compiling:

linking:
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 9.2 sek. Zeit: 19:26
Erstellen: 1 erfolgreich.


im DEBUG:

Code (glbasic) Select
_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:cef93a50 - 3D, NET
Wordcount:4002 commands
compiling:

linking:
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 16.9 sek. Zeit: 19:29
Erstellen: 1 erfolgreich.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: Worebu on 2014-Jun-24
Bei mir schauts so aus.

_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:ca4e7d65 - 3D, NET
Wordcount:3982 commands
compiling:

linking:
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 7.4 sek. Zeit: 20:32
Erstellen: 1 erfolgreich.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: erico on 2014-Jun-25
And for me, if I press F5, it goes this way:
Quote
_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:37233beb - 3D, NET
Wordcount:3982 commands
compiling:

linking:
success
_______________________________________
*** Finished ***
Elapsed: 9.0 sec. Time: 00:33
Build: 1 succeeded.


If I just press F8 it goes this way:
Quote
_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:37233beb - 3D, NET
Wordcount:3982 commands
compiling:
IncrediBuild skips: DDgui_test.gbas, DDgui.gbas,

linking:
success
_______________________________________
*** Finished ***
Elapsed: 3.5 sec. Time: 00:35
Build: 1 succeeded.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: spacefractal on 2014-Jun-25
Glbasic compile time is quite slow. Here it's very often over roughly 90 secs. This was the direct reason I'm longer will do big projects in glbasic.

Only smaller projects.

I'm do mind it's was better in v10.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: D2O on 2014-Jun-26
Das DDGui in den Samples-Ordner:
Allways project is cleaning.


F8 no debug
Quote*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:9918d709 - 3D, NET
Wordcount:3982 commands
compiling:

linking:
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 7.6 sek. Zeit: 18:35
Erstellen: 1 erfolgreich.

F5 no debug

Quote
_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:9918d709 - 3D, NET
Wordcount:3982 commands
compiling:

linking:
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 7.5 sek. Zeit: 18:37
Erstellen: 1 erfolgreich.

F8 debug
Quote_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:9918d709 - 3D, NET
Wordcount:4002 commands
compiling:

linking:
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 13.0 sek. Zeit: 18:39
Erstellen: 1 erfolgreich.

F5 debug
Quote_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:9918d709 - 3D, NET
Wordcount:4002 commands
compiling:

linking:
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 13.0 sek. Zeit: 18:39
Erstellen: 1 erfolgreich.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: S.O.P.M. on 2014-Jun-26
Vielen Dank Leute, das hilft mir schon weiter! Die Ergebnisse zeigen deutlich, dass meine Werte unter dem Durchschnitt liegen, womit ich auch bereits gerechnet hatte. Liegt dann wohl sicherlich an meinem Prozessor. Die Festplatte kann es kaum sein, denn meiner Meinung nach hat beim Compilieren vor allem der Prozessor zu tun. Bitte korrigiert mich, wenn ich falsch liege.

Wie spacefractal aber auch meint, ist GLBasic allgemein langsam beim Compilieren. Deshalb war ja mein Vorschlag, dass in Zukunft wirklich immer nur der Code compiliert wird, der sich geändert hat. Selbst in der selben Datei sollte nur der Code compiliert werden, den man geändert hat. Ganz klasse wäre dann noch, dass sogar beim nächsten Start von GLBasic - zumindest, wenn man das zuletzt bearbeitete Projekt wieder compiliert - er noch auf den letzten compilierten Code zurückgreifen würde und auch wieder nur tatsächliche Änderungen neu compiliert. Das wäre wirklich ein Komfort, den ich mir wünschen würde. Aber ich weiß auch, dass das möglicherweise zu viel verlangt ist und ich habe auch keine Ahnung, wie gut das zu implementieren ginge.

Ich werde zusehen, weiter so klar zu kommen, wie es jetzt ist. Mein Projekt wird sicherlich am Ende die dreifache Größe erreichen, dann hilft nur weitere Aufteilung in Quellcode Files.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: erico on 2014-Jun-26
Forgot to say, I have an i7 950 at around 3 or 3.0 ghz, 8gb ram, win7 64bit, some sata 3 ok fast HD.

My game has about 4661 commands and is split into 20 code files.
An F5 after a clean project:

Wordcount:4661 commands
Elapsed: 10.7 sec. Time: 14:28

If then I press F8:

IncrediBuild skips: TH_AVOCADO_MAYHEM.gbas, BOOT.gbas, DISPLAY_GAME.gbas, HI.gbas, HUDEBUG.gbas, OBJ_CONTROL.gbas, OUTPUT_GAME.gbas, RESET.gbas, SOUND.gbas, ST_AMBIENT.gbas, ST_ARVORE_PATRAO.gbas, ST_AVOCADO_PODRE.gbas, ST_AVOCADOS.gbas, ST_MACACO_PATRAO.gbas, ST_MACACOS.gbas, ST_MORCEGO_PATRAO.gbas, ST_PLAYERS.gbas, ST_POWER.gbas, ST_SCOREBOARD.gbas, ST_WOOD.gbas,
Elapsed: 3.4 sec. Time: 14:30

I think the speed is nice, most probably processor related.
I could do a project tolerating 5x that time at the latest stages without much trouble I guess.
May also put the processors at 3.6 or 3.8 to add a bit speed maybe.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: Marmor on 2014-Jun-26
junge junge sowas ungeduldiges .....

"früher" ging man erstmal Kaffe trinken vorm compilieren. :nana:
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: Schranz0r on 2014-Jun-27
Quote from: Marmor on 2014-Jun-26
junge junge sowas ungeduldiges .....

"früher" ging man erstmal Kaffe trinken vorm compilieren. :nana:

:D
Oder in den Mittag ...
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: spacefractal on 2014-Jun-28
im are not gernam, but used google translated, otherway here is my compile times (first is Spot Race, second is Greedy Mouse):

Code (glbasic) Select


_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:73686179 - 3D, NET
"background_1.gbas"(173) warning : GPC1004 variable already exists : ww
"background_2.gbas"(137) warning : GPC1004 variable already exists : ww
Wordcount:3468 commands
compiling:

linking:
success
_______________________________________
*** Finished ***
Elapsed: 24.0 sec. Time: 12:02
Build: 1 succeeded.

Start debug session.
_______________________________________
Injection started

Sprite Loaded: bg/sc1_bg1.jpg
****** RETINA ****** 1.4
Sprite Loaded: bg/sc1_bg_1b_2.png
Platform: System=WIN32 Device=WIN32
Graphics Resoulutuon: 1024x768
Scaling Used: 1
Frames Per Second: 60
Sprite Loaded: font_big.png
****** RETINA ****** 1.4
Sprite Loaded: black.png
Sprite Loaded: spots.png
Sprite Loaded: colors.png
Sprite Loaded: marking.png
here
found a match
NEW GAME
Save to File: C:/Users/spacefractal/Documents/SpotRace_AutoSave.ini
SaveStrOnce()
Save File: C:/Users/spacefractal/Documents/SpotRace_AutoSave.ini | Savegame


Code (glbasic) Select


_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:73686179 - 3D, NET
Wordcount:13703 commands
compiling:

linking:
success
_______________________________________
*** Finished ***
Elapsed: 92.3 sec. Time: 12:08
Build: 1 succeeded.

Start debug session.
_______________________________________
Injection started

OS_Default_Settings() start
OS: DESKTOP
Change_Resolution()
setres: 1024 768 :: 1920 1080
getcurrentdir: D:/Dokumenter/Programmer/Glbasic/GLBasic/Greedy_Mouse/GreedyMouse.app/Media/
LoadStr: ../GreedyMouse_SaveData/settings.ini = 1
******** INFO ********
TextureSize: 2
Logfile: ../GreedyMouse_Settings.log
tile size: 100
Default Zoom: 1.318
Interpolation: 2
Framerate: 30
LimitFPS: 30
OS_Default_Settings() end
SaveGame: ../GreedyMouse_SaveData/save.ini
Destiny: 1
DestinyFont: 1.2
DestinyPad: 1.5
C_ZOOM: 1.318
BIGAREA: 2
littlearea: 0.6591796875
tilesize: 100
device: DESKTOP
GetOrientation: 0
AndroidVersion: -1
TextureSizeMAX: 16384
******** INFOEND ********
Checks Files
MiniGame_Load() Settings
LOAD SETTINGSFILE
LoadStr: ../GreedyMouse_SaveData/settings.ini = 1
OS_Default_Settings() start
OS: DESKTOP
Change_Resolution()
getcurrentdir: D:/Dokumenter/Programmer/Glbasic/GLBasic/Greedy_Mouse/GreedyMouse.app/Media/
LoadStr: ../GreedyMouse_SaveData/settings.ini = 1
******** INFO ********
TextureSize: 2
Logfile: ../GreedyMouse_Settings.log
tile size: 100
Default Zoom: 1.318
Interpolation: 2
Framerate: 30
LimitFPS: 30
OS_Default_Settings() end
SaveGame: ../GreedyMouse_SaveData/save.ini
Destiny: 1
DestinyFont: 1.2
DestinyPad: 1.5
C_ZOOM: 1.318
BIGAREA: 2
littlearea: 0.6591796875
tilesize: 100
device: DESKTOP
GetOrientation: 0
AndroidVersion: -1
TextureSizeMAX: 16384
******** INFOEND ********
LOAD SAVEFILE
LoadStr: ../GreedyMouse_SaveData/save.ini = 1
LoadCloudStr: ../GreedyMouse_SaveData/save2.ini
SaveFile2$: 14278
LoadStr: ../GreedyMouse_SaveData/save.ini = 1
TVAR LOAD END
hero not found
MiniGame_Load() End
MiniGames_LoadingRoom() start
Game Mouse Load()
******** Load Floor (''):
SaveGame: 1
start a new level---
--------------------
error: 3
load()
Read Level: D:/Dokumenter/Programmer/Glbasic/GLBasic/Greedy_Mouse/GreedyMouse.app/Media/levels/paid/mouse_stones_01_village.tmx
No Baby Mode: 0
hero not found
ERROR:  -1
KillFile: ../GreedyMouse_SaveData/saveingame.dat
Read Level: D:/Dokumenter/Programmer/Glbasic/GLBasic/Greedy_Mouse/GreedyMouse.app/Media/levels/paid/mouse_stones_01_village.tmx
gpx/mouse_tiles_2.png -> Image allready loaded
gpx/mouse_tiles_1.png -> Image allready loaded
No Baby Mode: 0
medals: 0
d Decoratings Reset
add Decoratings
Game_Mouse_DetailMap end
Game_Mouse_ResetSign()
Game_Mouse_ResetSign(): startlevel
Game Mouse Load()
gpx/water_2_tall.png -> Image allready loaded
******** Load Floor: a
Soundfile Load is Finished
ControlMenu:
ControlMenu: main 
ControlMenu:
ControlMenu: main loadcovers
loadcovers :: 0
Music is Off: 1
MiniGames_LoadingRoom() end
OS_Default_Settings() start
OS: DESKTOP
Change_Resolution()
getcurrentdir: D:/Dokumenter/Programmer/Glbasic/GLBasic/Greedy_Mouse/GreedyMouse.app/Media/
LoadStr: ../GreedyMouse_SaveData/settings.ini = 1
******** INFO ********
TextureSize: 2
Logfile: ../GreedyMouse_Settings.log
tile size: 100
Default Zoom: 1.318
Interpolation: 2
Framerate: 30
LimitFPS: 30
OS_Default_Settings() end
SaveGame: ../GreedyMouse_SaveData/save.ini
Destiny: 1
DestinyFont: 1.2
DestinyPad: 1.5
C_ZOOM: 1.318
BIGAREA: 2
littlearea: 0.6591796875
tilesize: 100
device: DESKTOP
GetOrientation: 0
AndroidVersion: -1
TextureSizeMAX: 16384
******** INFOEND ********
MiniGame_Load() Settings
LOAD SETTINGSFILE
LoadStr: ../GreedyMouse_SaveData/settings.ini = 1
OS_Default_Settings() start
OS: DESKTOP
Change_Resolution()
getcurrentdir: D:/Dokumenter/Programmer/Glbasic/GLBasic/Greedy_Mouse/GreedyMouse.app/Media/
LoadStr: ../GreedyMouse_SaveData/settings.ini = 1
******** INFO ********
TextureSize: 2
Logfile: ../GreedyMouse_Settings.log
tile size: 100
Default Zoom: 1.318
Interpolation: 2
Framerate: 30
LimitFPS: 30
OS_Default_Settings() end
SaveGame: ../GreedyMouse_SaveData/save.ini
Destiny: 1
DestinyFont: 1.2
DestinyPad: 1.5
C_ZOOM: 1.318
BIGAREA: 2
littlearea: 0.6591796875
tilesize: 100
device: DESKTOP
GetOrientation: 0
AndroidVersion: -1
TextureSizeMAX: 16384
******** INFOEND ********


PS. IncrediBuild skips is rare happens here, even just changing variable in a function.... Its could have been much better. If IncrediBuild skips worked better, then im would not have a issue with the compiler speed.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: BumbleBee on 2014-Jun-28
Hmmm. Ganz schön flott bei euch.    ;)

Code (glbasic) Select


GPC - GLBasic Precompiler V.10.060 SN:e6ba2435 - 3D, NET
Wordcount:8 commands
compiling:

linking:
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 20794.1 sek. Zeit: 18:24

Erstellen: 1 erfolgreich.



Ich war Nachmittag noch gemütlich bummeln. Als ich vorhin Heim kam wars aber fertig  ;)  Nein, kleiner Spass. So lange dauerts dann doch nicht  :D

Cheers
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: spacefractal on 2014-Jul-06
just to been noticed, that increble skips is quite very bad... and seen its not working with strings at all. Even you just change one char in a string, its all over again, and again and again.´

In not understand why eventuelt h file can not been updated alone here, without require recompile every time. This is something the precompiler needs more work on.

That why glbasic ended for me for big projects. That is simply no more fun.

But im do have a smaller project throught (Spot Race).
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: S.O.P.M. on 2014-Jul-06
Genau das ist mir auch aufgefallen! Bei Änderung von Strings wird immer alles komplett neu compiliert. Hat das technische Ursachen und damit gute Gründe oder ginge das auch anders?
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: Kitty Hello on 2014-Jul-11
Good find. I'll try to improve that.

Gesendet von meinem GT-N7100 mit Tapatalk

Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: S.O.P.M. on 2014-Jul-11
Gernot, that would be totally awesome and I'd reward you with a donation for that! My project becomes larger and larger and it has a huge meaning for me to successfully finish it. Also please consider what I've suggested for compiling improvement.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: spacefractal on 2014-Jul-11
im thinks the main issue is in that way strings works is due that way the c++ compiler create gpc_temp_class.h. Im dont like that way its does, which seen compiles all strings to randoms ID for any string used. So soon there is any change, that mean the ID might have changed, and cause the app require a recompile.

im do wonder why its want all thoses const CGStr without using hash values for the string used.... and also why its need to collect all strings that way.

So im thinks the main issue with the incribleskips not working is all due ineffective way glbasic uses strings.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: Kitty Hello on 2014-Jul-15
The string reuse table is to improve the execution speed. It improved DDGui speed a lot. But I find a way for faster builds.

Gesendet von meinem GT-N7100 mit Tapatalk

Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: spacefractal on 2014-Jul-15
Property a options to disable the string reuse table could improve the compile speed very much, but in  excharge might cause a slower execution speed. But when testing things im would property not notice that. Not on Windows/Desktops.

Also its dosent skips correctly when a id is changed on the table. You should have used a form for hash values to make sure id dosent changes.

Im thinks that is the main reason its recompile from beginnings quite often.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: spacefractal on 2014-Jul-16
Sorry to repost, a another idea me thinkings, the string table could been done only when not compiled as debug version. But im dont thinks most users would mind a slower app when debugging thing anyway.... Also slow compile time when doing a release build, but fast compile time without that string table in the debug build. That could do the job nice too.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: kanonet on 2014-Jul-16
Debug builds are slower then release builds already, so even if you speed it up a bit, I dont think this would make that many people much more happy.

Something partially different:
When compiling for Android, I see no reason to always compile release and debug apk, one of them(depending on the selection) would be fine, like its the case on any other platform too.
Title: Re: Compilierungs-Geschwindigkeit Vergleiche
Post by: spacefractal on 2014-Jul-16
Its very different to wait 30 secs (when IncrediBuild skips happens) or 90 secs (when no IncrediBuild skips happens), if the main issue is due that way glbasic sorting strings in the table.... And yes debug builds is slower, so its no real means we needs to sorting strings that way, but im dong mind doing that in the release build of course.

On android with Android Extras, im did perfer debug version over than release version. This is due that way key signing works, so its much easier to do the debug version first for testing. Im cannot seperate the builds to each compiling, due that way glbasic calling the bat, so there is nothing im can due. Im whish there was two of them (one for debug and one for release), then its would not been a problem then.