Does HEAVYUSAGE have any meaning in RDMLX?
Does HEAVYUSAGE have any meaning in RDMLX?
HI Guys, Does using HEAVYUSAGE in RDMLX functions have any benefit? Since these are C/C++ Service programs, do they benefit in the same way as RPG programs do, using HEAVYUSAGE? If anyone has done testing around this area, please do share your findings. I have my doubts on HEAVYUSAGE having any benefits with RDMLX functions.
Re: Does HEAVYUSAGE have any meaning in RDMLX?
Hi,
Well, lets see...
If we create 4 functions:
* t41701 heavyusage, rdml
* t41702 non heavyusage, rdml
* t41703 heavyusage, rdmlx
* t41704 non heavyusage, rdmlx
and create a RDML function to call those 4 functions, measure the time and store it in a table:
and a rdmlx function to test the same:
the results IBM RDML (non rdmlx) function making the call:
the results IBM RDMLX function making the call are:
from this quick test.... conclusion here... calling with heavyusage is faster than not when calling multiple times the same thing,
but calling rdmlx to rdmlx makes no significant difference in speed and is already way faster than rdml.
Looks like HEAVYUSAGE still could have a very small impact if any when rdmlx involved, but I can't test right now with longer values/times to have a definitive answer... for a better test, make the functions called take longer time to process something, but this can give you a basis to perform a larger test.
* the same program runs in windows and produce similar results, but my windows notebook takes about 10 times longer than the IBM I am using... so make the loop longer or smaller depending on your machine.
kind regards,
Well, lets see...
If we create 4 functions:
* t41701 heavyusage, rdml
Code: Select all
Function Options(*DIRECT *HEAVYUSAGE)
Change Field(#STD_AMNT) To('#STD_NUM + 123')
Exchange Fields(#STD_AMNT)
ReturnCode: Select all
Function Options(*DIRECT)
Change Field(#STD_AMNT) To('#STD_NUM + 123')
Exchange Fields(#STD_AMNT)
ReturnCode: Select all
Function Options(*DIRECT *HEAVYUSAGE)
#STD_AMNT := #STD_NUM + 123
Exchange Fields(#STD_AMNT)
ReturnCode: Select all
Function Options(*DIRECT)
#STD_AMNT := #STD_NUM + 123
Exchange Fields(#STD_AMNT)
ReturnCode: Select all
Function Options(*DIRECT)
Begin_Loop Using(#STD_QTY) To(4)
Use Builtin(NUMERIC_STRING) With_Args(#STD_QTY) To_Get(#STD_TEXTS)
Use Builtin(CONCAT) With_Args('T4170' #STD_TEXTS) To_Get(#FUNCTION)
Use Builtin(CONCAT) With_Args(#STD_TEXTS ' *START* ' *TIMEC) To_Get(#STD_TEXTL)
Insert Fields(#STD_TEXTL) To_File(LOGXX)
Begin_Loop To(100000)
Change Field(#STD_NUM) To(9999)
Exchange Fields(#STD_NUM)
Call Process(*DIRECT) Function(#FUNCTION)
End_Loop
Use Builtin(NUMERIC_STRING) With_Args(#STD_AMNT) To_Get(#STD_CODEL)
Use Builtin(CONCAT) With_Args(#STD_TEXTS ' *END* ' *TIMEC ' * ' #STD_CODEL) To_Get(#STD_TEXTL)
Insert Fields(#STD_TEXTL) To_File(LOGXX)
End_Loop
Code: Select all
Function Options(*DIRECT)
Begin_Loop Using(#STD_QTY) To(4)
#FUNCTION := 'T4170' + #STD_QTY.AsString
#STD_TEXTL := #STD_QTY.AsString + ' *START* ' + *TIMEC
Insert Fields(#STD_TEXTL) To_File(LOGXX)
#STD_AMNT := 0
Begin_Loop To(100000)
#STD_NUM := 9999
Exchange Fields(#STD_NUM)
Call Process(*DIRECT) Function(#FUNCTION)
End_Loop
#STD_TEXTL := #STD_QTY.AsString + ' *END* ' + *TIMEC + ' * ' + #STD_AMNT.AsString
Insert Fields(#STD_TEXTL) To_File(LOGXX)
End_Loop
Code: Select all
1 *START* 134246
1 *END* 134331 * 10122 0:45 RDML -> RDML HEAVYUSAGE
2 *START* 134331
2 *END* 134420 * 10122 0:51 RDML -> RDML
3 *START* 134420
3 *END* 134423 * 10122 0:03 RDML -> RDMLX HEAVYUSAGE
4 *START* 134423
4 *END* 134427 * 10122 0:04 RDML -> RDMLX
Code: Select all
1 *START* 133730
1 *END* 133818 * 10122.00 0:48 RDMLX -> RDML HEAVYUSAGE
2 *START* 133818
2 *END* 133911 * 10122.00 0:53 RDMLX ->RDML
3 *START* 133911
3 *END* 133912 * 10122.00 0:01 RDMLX -> RDMLX HEAVYUSAGE
4 *START* 133912
4 *END* 133914 * 10122.00 0:02 RDMLX -> RDMLXbut calling rdmlx to rdmlx makes no significant difference in speed and is already way faster than rdml.
Looks like HEAVYUSAGE still could have a very small impact if any when rdmlx involved, but I can't test right now with longer values/times to have a definitive answer... for a better test, make the functions called take longer time to process something, but this can give you a basis to perform a larger test.
* the same program runs in windows and produce similar results, but my windows notebook takes about 10 times longer than the IBM I am using... so make the loop longer or smaller depending on your machine.
kind regards,
Re: Does HEAVYUSAGE have any meaning in RDMLX?
Thanks! Please do share execution results for both Windows and IBMi executions.
I'm more interested in IBMi executions, as that's where the HEAVYUSAGE command becomes relevant.
Since RDMLX programs use C/C++, I suspect there is a performance hit too as nothing runs as fact as RPG on the IBMi server.
I'm more interested in IBMi executions, as that's where the HEAVYUSAGE command becomes relevant.
Since RDMLX programs use C/C++, I suspect there is a performance hit too as nothing runs as fact as RPG on the IBMi server.
Re: Does HEAVYUSAGE have any meaning in RDMLX?
windows old notebook, rdmlX making the call, only 10,000 cycles instead of 100,000 in the ibm,
and rdml making the call
using heavyusage is a bit faster. amount same performance rdml and rdmlx.
so I think heavyusage means something for rdmlx too.
Code: Select all
1 *START* 182541
1 *END* 182643 * 10122.00 rdmlx--->rdml heavyusage, 1:02
2 *START* 182643
2 *END* 182748 * 10122.00 rdmlx--->rdml, 1:05
3 *START* 182748
3 *END* 182844 * 10122.00 rdmlx--->rdmlx heavyusage, 0:56
4 *START* 182844
4 *END* 182950 * 10122.00 rdmlx--->rdmlx, 1:06Code: Select all
1 *START* 183526
1 *END* 183627 * 10122 rdml-->rdml heavyusage 1:01
2 *START* 183627
2 *END* 183736 * 10122 rdml-->rdml 1:09
3 *START* 183736
3 *END* 183840 * 10122 rdml-->rdmlx heavyusage 1:04
4 *START* 183840
4 *END* 183948 * 10122 rdmlx-->rdmlx 1:08so I think heavyusage means something for rdmlx too.