× 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.



PS.

I generates about 10,000 XML encoded elements in 1,07 sec


On Thu, Oct 3, 2013 at 4:28 PM, Henrik Rützou <hr@xxxxxxxxxxxx> wrote:

Sorry to say it but XML special characters has to be encoded so
raw field/string concat is the worst way to try to make stable XML.

If you have CDATA sections it is probably caused by problems with
these special characters.

I asked and i ask again - how big is the XML you are generating
without that knowledge it is impossible to judge if one second
generation time is okay!




On Thu, Oct 3, 2013 at 3:28 PM, Tim Wright <
Tim.Wright@xxxxxxxxxxxxxxxxxxxxxx> wrote:

Lots of great suggestions coming in. Many thanks!
We are definitely going to go with a varying-length variable and a
reduction of the %trim occurrences.
Also looking into some of the other suggestions.

I will try to post back with any results we get so that everyone can
benefit from any gains we make.





From: Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
To: "RPG programming on the IBM i (AS/400 and iSeries)"
<rpg400-l@xxxxxxxxxxxx>,
Date: 10/03/2013 09:18 AM
Subject: Re: Pushing XML out to a browser request
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



+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

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



**************************
This e-mail message may contain confidential or privileged information. If
you are not the intended recipient, please delete the message and any
attachments and notify the sender by return e-mail. You should not retain,
distribute, disclose or use any of the information in this message.
**************************

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





--
Regards,
Henrik Rützou

http://powerEXT.com <http://powerext.com/>






As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.