It is currently Mon Dec 09, 2019 3:54 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: [IDE Tool] pbOptimizer
PostPosted: Tue Aug 13, 2019 6:43 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 630
Location: Linz, Austria
Image
With pbOptimizer you can clean up your source code and/or final executable from leftover Comments, Procedures, uncalled PB Libraries and Functions.

This is a beta version! Please report all bugs here... Thank you. Download pbOptimizer.zip (PB 5.7x+, Windows only)



v0.9.8.6
  • fixed ImageEncoder removal
  • added the display of "Called WinAPI Functions" when processing ASM

v0.9.8.5
  • fixed "Remove Uncalled Libs/Funcs" not working properly without having "Remove Comments" selected too
  • fixed ImagePlugins detection
  • added Jpeg2000 support (.jp2)
  • added a MessageBox if the compiled program crashes on execution ("Run Output")
  • renamed "Remove Macro Comments" to "Remove Resolved Macros"
  • some minor fixes

v0.9.8.4
  • fixed a bug with RC files that weren't added when "Include Version Information" was not ticked (Many thanks to Denis for providing me with a project)
  • added a hint for "Open .pb". If you open the same file again and again, you first have to close the file in the IDE or you won't see the update...

v0.9.8.3
  • #PB_Editor_CompileCount, #PB_Editor_BuildCount, #PB_Editor_CreateExecutable are no longer case sensitive
  • IDE file settings are now also applied to the optimized .pb
  • tweaked Macros and Procedures filtering
  • some minor fixes

v0.9.8.2
  • added compatibility with #PB_Editor_CompileCount, #PB_Editor_BuildCount, #PB_Editor_CreateExecutable (read only)
  • added "Remove ImagePlugins" to remove ImagePlugins if the string ".bmp", ".png", ".tga", ... was not found anywhere in the source code
  • added a timer
  • more string concatenations fixed
  • "Remove Uncalled Procedures" is not case sensitive anymore

v0.9.8.1
  • better string concatenation (massive speed improvement)
  • optimized UI responsiveness
  • added a progressbar

v0.9.8.0
  • fixed a bug with _THREAD and _DOUBLE


Last edited by chi on Sun Sep 01, 2019 1:38 am, edited 8 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Wed Aug 14, 2019 5:53 am 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3148
Location: Boston, MA
Can't wait to try! 8)

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Wed Aug 14, 2019 9:10 am 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 30, 2003 8:15 am
Posts: 990
Location: Germany
Looks promising! :)

I also tried it out with a bigger project, there the optimization runs already since 20min...
Could you still display interim reports or a progress bar to see if the program is still running?

Ciao Dige

_________________
"Daddy, I'll run faster, then it is not so far..."


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Wed Aug 14, 2019 12:56 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 630
Location: Linz, Austria
dige wrote:
I also tried it out with a bigger project, there the optimization runs already since 20min...
Over 20min? How many lines did the ASM-part report? Did it finish successfully, though?
dige wrote:
Could you still display interim reports or a progress bar to see if the program is still running?
I'll see what I can do ;)


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Wed Aug 14, 2019 3:55 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 630
Location: Linz, Austria
updated to v0.9.8.1


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Thu Aug 15, 2019 7:55 am 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 30, 2003 8:15 am
Posts: 990
Location: Germany
The tested source code has about 100000 lines.
I aborted pbOptimizer after 30min.
The same result with version 0.9.8.1.

Ciao Dige

_________________
"Daddy, I'll run faster, then it is not so far..."


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Thu Aug 15, 2019 9:19 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Apr 18, 2019 8:17 am
Posts: 434
Using 0.9.8.1 beta, my source is stuck on this for over 5 minutes now:

Image


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Thu Aug 15, 2019 9:26 am 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 30, 2003 8:15 am
Posts: 990
Location: Germany
After 1 hour and 30 min .. the last output is still "Optimizing..."

_________________
"Daddy, I'll run faster, then it is not so far..."


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Thu Aug 15, 2019 11:54 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 25, 2003 5:10 pm
Posts: 508
Location: Doubs - France
Hi chi

i don't know how fred do with PB lib.

So, if you remove a call to a PB lib named 'x', and PB use it not directly but inside another lib, how to know that ?
Just a question.

_________________
A+
Denis


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Thu Aug 15, 2019 5:19 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 630
Location: Linz, Austria
dige wrote:
The tested source code has about 100000 lines.
I aborted pbOptimizer after 30min.
The same result with version 0.9.8.1.

Ciao Dige
Hard to say... The biggest project I'm testing with is ~12.000 ASM lines and it takes about 20 seconds (0.9.8.1) to compile. With 0.9.8.0 it took 2min. Maybe it's another string problem, but without testing/debugging, it's just a hunch.

BarryG wrote:
Using 0.9.8.1 beta, my source is stuck on this for over 5 minutes now:
Always stuck after "String Format"? Was it able to finish? What OS are you on (x86,x64)?

Denis wrote:
Hi chi

i don't know how fred do with PB lib.

So, if you remove a call to a PB lib named 'x', and PB use it not directly but inside another lib, how to know that ?
Just a question.
You can see the dependencies when you edit e.g.\PureBasic\PureLibraries\Window = 2DDrawing Desktop VectorDrawing SimpleList Object Gadget Event. pbOptimizer simply filters them and deletes those that are never called.


Does anyone know a big project to test with?


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Thu Aug 15, 2019 5:34 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 25, 2003 5:10 pm
Posts: 508
Location: Doubs - France
chi wrote:

Denis wrote:
Hi chi

i don't know how fred do with PB lib.

So, if you remove a call to a PB lib named 'x', and PB use it not directly but inside another lib, how to know that ?
Just a question.
You can see the dependencies when you edit e.g.\PureBasic\PureLibraries\Window = 2DDrawing Desktop VectorDrawing SimpleList Object Gadget Event. pbOptimizer simply filters them and deletes those that are never called.


What i want to tell is that there are may be hidden reference to this lib that is a lib coulb be called indirectly by another lib not only par it's ows procedures.

chi wrote:
Does anyone know a big project to test with?

I will try with my projet PureIconManager (about 65 000 lines) but today if i get enough time.

_________________
A+
Denis


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Thu Aug 15, 2019 8:34 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:34 pm
Posts: 921
Location: Canada
Gave it a try but it doesn't like Editor Constants...
Image

Maybe it would be a good idea to display an error message and quit instead of listing an error with all the other info in the optimizer window and showing "Optimizing..."
I didn't realize the optimizer was done because it still showed "Optimizing..."


It also removed procedures that were actually being used so the final optimized code would not compile.

_________________
Image Image


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Fri Aug 16, 2019 1:08 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 630
Location: Linz, Austria
updated to v0.9.8.2


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Fri Aug 16, 2019 1:40 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 630
Location: Linz, Austria
chi wrote:
The biggest project I'm testing with is ~12.000 ASM lines and it takes about 20 seconds (0.9.8.1) to compile. With 0.9.8.0 it took 2min.
With 0.9.8.2 it takes 8 seconds to compile ;)


Top
 Profile  
Reply with quote  
 Post subject: Re: [IDE Tool] pbOptimizer
PostPosted: Fri Aug 16, 2019 4:41 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 164
Code:
LoggerInfo("Version - 0.1."+Str(#pb_editor_buildcount)+"."+Str(#pb_editor_compilecount))


This is some lines of my code.
#pb_editor_buildcount
#pb_editor_compilecount

are PB constants when you activate it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye