× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



+1 on this - I remember working on a program that built HTML with lots of lines like this -

htmlfixed = %trim(htmlfixed) + 'another long ugly string of HTML over lots of lines in RPG code';

htmlfixed was, obviously, a fixed-length variable.

When I did this with a varying-length variable, the web page noticeable snapped.

htmlvarying = htmlvarying + 'the same ugly long string - anyone up for CGIDEV2?';

And htmlfixed was probaby 32K - there are probably ways to optimize %trim, but conceptually, don't you have to scan from the end back to the first non-blank? For every time you append some data? Varying-length variables tell you where that end is - ba-da-bing easy!

Vern

On 10/2/2013 5:13 PM, John Yeung wrote:
On Wed, Oct 2, 2013 at 4:47 PM, Briggs, Trevor (TBriggs2)
<TBriggs2@xxxxxxxxxxx> wrote:
Are you doing the:

@Xml = %Trim(@Xml) + ...

multiple times on each build?
I'll bet this is a major (if not the major) factor slowing him down.
About a year ago, there was a thread on this list titled "XML
performance issue" (starts with
http://archive.midrange.com/rpg400-l/201209/msg00135.html). It came
up during that thread that lots of trimming and joining of large,
nonvarying strings is a big performance hit. If @Xml is a
fixed-length string destined to become a CLOB, it sounds like that's
one likely place to get speed improvements.

John


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.