Extremely slow to build project - slow compile of one large pbl

I'm using PowerBuilder 5 (have no choice) and have a huge problem when I try to do a full rebuild on the libraries to make the executable.

- It takes about fourty minutes on one particular PBL. All others build quickly.
- The PBL in question has all of the window functions inculded with it.
- The time it takes is independant of the system it's run on (takes the same time on a P3 800 as it does on a P4 2.8GHz w/HT both with 512MB RAM).
- Incremental rebuild takes less than 10 seconds.
- The PBL is about 560,000 bytes, has 63 window functions, about 150 global variables and one external global function (Math.dll).

Any ideas? I'm a bit of a powerbuilder novice so a simple answer is required. I'm normally a C++ developer. If I need to break up the window functions is there an easy way to do this? A solution to this problem is extremely valuable to me even though it may be a simple anwser.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Always a full rebuild will take a lot of time because:

1. PB export all objects out of Library as txt files.
2. check and order all dependences between objects, looking for missing objects you have deleted by accident.
3. PB import all objects based on their txt files in order based on dependence of step [2], this garantee to PB that all variables and functions exist to create the object
4. Write objects into interpreted form files .PBD or in C++ to compile .DLL's

Are you building .DLL's (machine code)   ord .PBD's (interpreted) ?  If you build .DLL's it will take a a bit longer because all ojects are converted into C++ code to compile those DLL's.

In your case incremental rebuild takes less than 10 seconds  because none of your objects have changed. This type of compilation only export and import those objects that have changed since last compilation and their descendents, next it only build .PBD or .DLL of those libraries afected by import-export process.

I suggest you use incremental rebuild while you are in development becase it's faster and maybe you are correcting or testing a small portion of project at a time.

I also suggest you to split your biggest PBL to increase that incremental rebuild.

But I strongly suggest to use Full Rebuid when you finish your test/corrections and want to deliver to your customer.

Hope it helps


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Are your pbl's on a network drive by any chance?  Regenerations on a network drive are notoriously slow regardless of your network connection speed.  If they are on a network drive try copying them down to your local PC and see how much faster they run.
MatrixDwellerAuthor Commented:
That was the first thing I did when I took over this project. People here were even building with VS.NET over the network which is faster, but still slow. I'm thinking that I'm going to have to not compile to machine code and go with p-code. P-code (.pbd) takes 10 seconds (I timed it) to compile and in my testing with the app I'm working on it executes just as fast if not better. I was just shocked that c-code should take so long to compile even on a suped up machine. I've always been under the assumtion that c-code is better than p-code (ie vb).
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

I did not even think to ask if you were compiling into machine code.  I always recommend compiling into p-code.  The machine code is faster, but usually not noticeably faster.  The problem with machine code there are more little bugs and oddities.  
If you are doing something that really needs the small bit of extra speed machine code gives you it’s a good excuse to move to PB10 so you can use PBNI and write those parts in C.  :)

your pbl is way too big, best not to have any pbls larger than 2 MB for optimal building
solution: make some new pbls and move objects to those until you have the right size.

 to get an idea, we have approx. 100 windows divided over 73 pbls

Good luck,


PS: other factors are: virusscanner active, pbl located on networkdrive, PB environment variables (PBPOOL, ....)
MatrixDwellerAuthor Commented:
Since I'm not that familiar with Powerbuilder (version 5) I'm not sure how I would move a window function and make it accessible by that window.
jeez.. i hadn't seen that it were window functions,, not windows
why is it so heavy?? and why 150 global variables??

sounds like you'll need to add some design changes, encapsulate controls etc.. in visual user objects (hope you got that in pb5, i started in 6.5), shift the global variables to application service object (eg. take a look at pfc for good ideas) and start using services "in general" to keep functionality separate and manageable.
after that you should get a number of objects in your pbl, then move them to other pbls so size shrinks of that one.

If all that is not worth it, i suppose you'll then need to live with it.


PS: i assume you optimized your pbl before? (eg: make an empty pbl + copy that 1 window object in it, how big would it be)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.