1. ATK Gimmy Susan
  2. PowerBuilder
  3. Thursday, 11 April 2019 07:19 AM UTC
Hi Guru

Pbd are interpreted  code
DLL are c-compiled code

A simple question: What are the reasons why I should choose a compile in "machine code" and not in "PCode", or vice versa. (in addition to DLL will execute script code faster )

thank you

GMY

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 11 April 2019 19:24 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Gimmy;

    Pure "Raw" speed for sure. I had a project a few years ago where if we could not compile our PB Apps into machine code, they would not have run within the performance specifications & operational constraints needed for production. These PB Apps were processing 1,000's of images (OCR and Redaction) per second and ran 24/7 for just over 9 months to complete the task. In our testing with P-Code, the apps would have taken 2+ years to complete the job.  I did a presentation at the Charlotte PB conference a few years back on this project.

  The other benefit though is also forcing you to write better PowerScript code. Machine compilation in PB emits C++ and the Microsoft "C" compiler & linkage-editors are way more finicky about errors and especially warnings on your code. So compiling to M-Code is a great way to make sure that your eventual P-Code is better written. FWIW: My STD Frameworks have always been Q/A'ed via the M-Code route. You'll notice if you compile Apps with these framework that no errors or warning are ever produced and it runs like a "Jack Rabbit" - LOL!

HTH

Regards ... Chris

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Thursday, 11 April 2019 14:07 PM UTC
  2. PowerBuilder
  3. # 1

Generally, i would not build to dll unless you have specific reason to do so. it takes longer to compile.

speed is the main (only?) reason to build to dll, and that would mainly be for things like large loops.   In the 90s, building to a dll was a big feature since computers were relatively slow compared to current machines.  

If your app is mainly doing database work, the speed difference will not be noticeable.  Also it has no effect on datawindow operations, so if you are doing lots of things with datawindows it won't help at all.

 

If appeon was going to cut a feature in order to better prioritize, this would be my #1 recommended feature to remove.

 

 

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.