本篇內(nèi)容介紹了“怎么使用ABAP異步RFC調(diào)用提升應(yīng)用性能”的有關(guān)知識(shí),在實(shí)際案例的操作過(guò)程中,不少人都會(huì)遇到這樣的困境,接下來(lái)就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
創(chuàng)新互聯(lián)是一家專注于做網(wǎng)站、網(wǎng)站設(shè)計(jì)與策劃設(shè)計(jì),衡南網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)做網(wǎng)站,專注于網(wǎng)站建設(shè)10余年,網(wǎng)設(shè)計(jì)領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:衡南等地區(qū)。衡南做網(wǎng)站價(jià)格咨詢:18980820575
采用如下report 研究asynchronous RFC call的性能提升:
PARAMETERS: num TYPE i OBLIGATORY DEFAULT 10. DATA:ls_line TYPE zjerry1, lv_start TYPE i, lv_end TYPE i, lv_taskid TYPE c LENGTH 8, lv_index TYPE c LENGTH 4, lv_finished TYPE i, lv_count TYPE i. START-OF-SELECTION. PERFORM solution2. FORM solution2. DELETE FROM zjerry1. GET RUN TIME FIELD lv_start. DO num TIMES. lv_index = sy-index. lv_taskid = 'Task' && lv_index. CALL FUNCTION 'ZINSERT' STARTING NEW TASK lv_taskid PERFORMING callback ON END OF TASK EXPORTING iv_index = CONV comm_product-product_id( sy-index ). ENDDO. WAIT UNTIL lv_finished = num. GET RUN TIME FIELD lv_end. lv_end = lv_end - lv_start. WRITE: / 'Solution2: ' , lv_end COLOR COL_NEGATIVE. SELECT COUNT( * ) INTO lv_count FROM zjerry1. ASSERT lv_count = num. ENDFORM. FORM callback USING p_task TYPE clike. ADD 1 TO lv_finished. ENDFORM. function module ZINSERTmonitor的是一個(gè)比較費(fèi)時(shí)的操作,在末尾會(huì)有一個(gè)DB的insertion: DATA: ls_line TYPE zjerry1, lv_cal TYPE timestamp, lv_cal1 TYPE timestamp. GET TIME STAMP FIELD lv_cal. DO 10000 TIMES. lv_cal = lv_cal + 1. lv_cal = ( lv_cal * 13 ) / 12. DO 100 TIMES. GET TIME STAMP FIELD lv_cal1. lv_cal = lv_cal * 13 / 17. ENDDO. ENDDO. ls_line-code_value = iv_index. INSERT zjerry1 FROM ls_line. ASSERT sy-subrc = 0. COMMIT WORK AND WAIT.
DB的結(jié)構(gòu)非常簡(jiǎn)單:
如果在report 里直接調(diào)用ZINSERT, response time為4.493 seconds.
如果在DO 2 TIMES里調(diào)用兩次ZINSERT, 兩次function module call是依次執(zhí)行的,response time為8.493 seconds
如果用report 以參數(shù)2 以異步的方式調(diào)用ZINSERT 2次,report 本身的response time為3.074 seconds:
number = 3:
number = 5:
“怎么使用ABAP異步RFC調(diào)用提升應(yīng)用性能”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!