Download - Code Optimisation
![Page 1: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/1.jpg)
code optimisationOlivier Deschanels, Senior Consultant
![Page 2: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/2.jpg)
optimise your code, you must
![Page 3: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/3.jpg)
optimise your code, you must
![Page 4: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/4.jpg)
optimise your code, you must
レスポンスの速度を向上させるために
リクエストの効率を良くするために
トラフィック量を減らすために
コードを簡易にするために
保守を楽にするために
将来に備えるために
![Page 5: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/5.jpg)
before coding …
![Page 6: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/6.jpg)
Murphy was an incurable optimist
![Page 7: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/7.jpg)
1
Murphy was an incurable optimist
![Page 8: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/8.jpg)
1
Murphy was an incurable optimist
![Page 9: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/9.jpg)
1
2
Murphy was an incurable optimist
![Page 10: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/10.jpg)
1
2
Murphy was an incurable optimist
![Page 11: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/11.jpg)
1
2
3
Murphy was an incurable optimist
![Page 12: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/12.jpg)
1
2
3
Murphy was an incurable optimist
![Page 13: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/13.jpg)
1
2
3
4
Murphy was an incurable optimist
![Page 14: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/14.jpg)
1
2
3
4
Murphy was an incurable optimist
![Page 15: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/15.jpg)
1
2
3
4
5
Murphy was an incurable optimist
![Page 16: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/16.jpg)
1
2
3
4
5
Murphy was an incurable optimist
![Page 17: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/17.jpg)
C/S isn't just a multiprocess standalone
![Page 18: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/18.jpg)
C/S isn't just a multiprocess standalone
![Page 19: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/19.jpg)
スタンドアロン版でしかコードを検証していなかった …
C/S isn't just a multiprocess standalone
![Page 20: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/20.jpg)
スタンドアロン版でしかコードを検証していなかった …
何が起きているのか理解するためにC/S版でデバッグと検証が必要 …
C/S isn't just a multiprocess standalone
![Page 21: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/21.jpg)
スタンドアロン版でしかコードを検証していなかった …
何が起きているのか理解するためにC/S版でデバッグと検証が必要 …
最初からC/S版で開発していれば時間の節約に
C/S isn't just a multiprocess standalone
![Page 22: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/22.jpg)
wifi makes delays worse
![Page 23: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/23.jpg)
wifi makes delays worse
![Page 24: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/24.jpg)
wifi makes delays worse
![Page 25: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/25.jpg)
wifi makes delays worse
![Page 26: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/26.jpg)
x 1.2
wifi makes delays worse
![Page 27: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/27.jpg)
wifi makes delays worse
![Page 28: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/28.jpg)
0 ms 3,750 ms 7,500 ms 11,250 ms 15,000 ms
wifi makes delays worse
![Page 29: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/29.jpg)
0 ms 3,750 ms 7,500 ms 11,250 ms 15,000 ms
wifi makes delays worse
![Page 30: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/30.jpg)
0 ms 3,750 ms 7,500 ms 11,250 ms 15,000 ms
wifi makes delays worse
![Page 31: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/31.jpg)
0 ms 3,750 ms 7,500 ms 11,250 ms 15,000 ms
x 7.5
wifi makes delays worse
![Page 32: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/32.jpg)
0 ms 3,750 ms 7,500 ms 11,250 ms 15,000 ms
x 7.5
Time with 'execute on server' method attribute"サーバー上で実⾏メソッド"属性を有効にした場合
wifi makes delays worse
![Page 33: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/33.jpg)
0 ms 3,750 ms 7,500 ms 11,250 ms 15,000 ms
wifi makes delays worse
![Page 34: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/34.jpg)
0 ms 3,750 ms 7,500 ms 11,250 ms 15,000 ms
÷23
÷6
wifi makes delays worse
![Page 35: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/35.jpg)
0 ms 3,750 ms 7,500 ms 11,250 ms 15,000 ms
÷23
÷6
wifi makes delays worse
![Page 36: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/36.jpg)
know your code activity, you should
![Page 37: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/37.jpg)
know your code activity, you should
![Page 38: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/38.jpg)
know your code activity, you should
1
![Page 39: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/39.jpg)
know your code activity, you should
1
SET DATABASE PARAMETER(Debug log recording;2+4+8+16)
![Page 40: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/40.jpg)
know your code activity, you should
1
2
![Page 41: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/41.jpg)
know your code activity, you should
1
2
3
![Page 42: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/42.jpg)
know your code activity, you should
1
2
3
SET DATABASE PARAMETER(Debug log recording;0)
![Page 43: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/43.jpg)
know your code activity, you should
1
2
3
4 logs
![Page 44: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/44.jpg)
know your code activity, you should
1
2
3
4 logs
5 4DDebugLog_1.txt
![Page 45: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/45.jpg)
know your code activity, you should
1
2
3
4 logs
5 4DDebugLog_1.txt
![Page 46: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/46.jpg)
know your code activity, you should
1
2
3
4 logs
5 4DDebugLog_1.txt
![Page 47: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/47.jpg)
too much info; select you must
![Page 48: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/48.jpg)
too much info; select you must
1
![Page 49: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/49.jpg)
too much info; select you must
1
2
![Page 50: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/50.jpg)
too much info; select you must
1
2
![Page 51: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/51.jpg)
too much info; select you must
1
2
3
![Page 52: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/52.jpg)
too much info; select you must
1
2
3
![Page 53: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/53.jpg)
too much info; select you must
1
2
3
4
![Page 54: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/54.jpg)
too much info; select you must
SET DATABASE PARAMETER(Log command list;"277") SET DATABASE PARAMETER(Debug log recording;2+4+8+16)
1
2
3
4
![Page 55: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/55.jpg)
too much info; select you must
SET DATABASE PARAMETER(Log command list;"277") SET DATABASE PARAMETER(Debug log recording;2+4+8+16)SET DATABASE PARAMETER(Log command list;"277;341") SET DATABASE PARAMETER(Debug log recording;2+4+8+16)
1
2
3
4
![Page 56: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/56.jpg)
too much info; select you must
SET DATABASE PARAMETER(Log command list;"277") SET DATABASE PARAMETER(Debug log recording;2+4+8+16)SET DATABASE PARAMETER(Log command list;"277;341") SET DATABASE PARAMETER(Debug log recording;2+4+8+16)
QUERY (277) および QUERY SELECTION (341)
コマンドを監視
1
2
3
4
![Page 57: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/57.jpg)
set the flags
![Page 58: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/58.jpg)
SET DATABASE PARAMETER(Debug log recording; 2 + 4 + 8 + 16)
set the flags
![Page 59: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/59.jpg)
SET DATABASE PARAMETER(Debug log recording; 2 + 4 + 8 + 16)
2 : 引数も記録(メソッドおよびコマンド)
4 : タブ区切りフォーマット
8 : 遅延書き込みモード
16 : プラグインも対象
set the flags
![Page 60: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/60.jpg)
know your code activity, you should
![Page 61: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/61.jpg)
know your code activity, you should
1
![Page 62: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/62.jpg)
know your code activity, you should
1
SET DATABASE PARAMETER(Log command list;"") SET DATABASE PARAMETER(Debug log recording;4+8+16)
![Page 63: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/63.jpg)
know your code activity, you should
1
2
![Page 64: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/64.jpg)
know your code activity, you should
1
2
3
![Page 65: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/65.jpg)
know your code activity, you should
1
2
3
![Page 66: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/66.jpg)
know your code activity, you should
1
2
3
4
![Page 67: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/67.jpg)
know your code activity, you should
1
2
3
4
5
![Page 68: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/68.jpg)
know your code activity, you should
1
2
3
4
5
6
![Page 69: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/69.jpg)
![Page 70: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/70.jpg)
![Page 71: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/71.jpg)
1
![Page 72: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/72.jpg)
1
2
![Page 73: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/73.jpg)
1
2
3
![Page 74: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/74.jpg)
1
2
3
4
![Page 75: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/75.jpg)
1
2
3
4
5
![Page 76: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/76.jpg)
1
2
3
4
5
SET DATABASE PARAMETER(Circular log limitation;10)
![Page 77: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/77.jpg)
1
2
3
4
5
SET DATABASE PARAMETER(Circular log limitation;10)
10 x 10MB = 最⼤100MB
![Page 78: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/78.jpg)
reduce the use of variables, you must
![Page 79: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/79.jpg)
variable and variables table
![Page 80: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/80.jpg)
1
variable and variables table
![Page 81: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/81.jpg)
1
2
variable and variables table
![Page 82: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/82.jpg)
1
2
3
variable and variables table
![Page 83: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/83.jpg)
1
2
3
4
variable and variables table
![Page 84: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/84.jpg)
1
2
3
4
5
variable and variables table
![Page 85: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/85.jpg)
1
2
3
4
5
6
variable and variables table
![Page 86: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/86.jpg)
![Page 87: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/87.jpg)
サーバー
クライアント#1
クライアント#2
![Page 88: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/88.jpg)
P1PR1
グローバルプロセス裏⽅のツインプロセス
ネットワーク接続
このプロセスが実⾏ : - トリガ - "サーバー上で実⾏"
![Page 89: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/89.jpg)
P1
P2
PR1
PR2
![Page 90: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/90.jpg)
P1
P2
$P3
PR1
PR2
$ローカルプロセス
![Page 91: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/91.jpg)
P1
P2
$P3
PR1
PR2
P1'
$P2'
PR1'
![Page 92: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/92.jpg)
P1
P2
$P3
PR1
PR2
P1'
$P2'
PR1'
SP2
SP1
ストアドプロシージャー
![Page 93: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/93.jpg)
P1
P2
$P3
PR1
PR2
P1'
$P2'
PR1'
SP2
SP1
WP2
WP3
WP1
Webプロセス
![Page 94: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/94.jpg)
P1
P2
$P3
PR1
PR2
P1'
$P2'
PR1'
SP2
SP1
WP2
WP3
WP1
コンパイル
モード
![Page 95: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/95.jpg)
P1
P2
$P3
PR1
PR2
<>
P1'
$P2'
PR1'
SP2
SP1
WP2
WP3
WP1
インタープロセス変数テーブル
コンパイル
モード
![Page 96: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/96.jpg)
P1
P2
$P3
PR1
PR2
<> <>
P1'
$P2'
<>PR1'
SP2
SP1
WP2
WP3
WP1
コンパイル
モード
![Page 97: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/97.jpg)
P1
P2
$P3
PR1
PR2
<> <>
P1'
$P2'
<>PR1'
V
SP2
SP1
WP2
WP3
WP1
プロセス変数テーブル
コンパイル
モード
![Page 98: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/98.jpg)
P1
P2
$P3
PR1
PR2
<> <>
P1'
$P2'
<>PR1'
V
V
V
V
V
SP2
SP1
WP2
WP3
WP1
コンパイル
モード
![Page 99: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/99.jpg)
P1
P2
$P3
PR1
PR2
<> <>
P1'
$P2'
<>PR1'
V
V
V
V
V
SP2 V
SP1 V
WP2 V
WP3 V
WP1 V
コンパイル
モード
![Page 100: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/100.jpg)
P1
P2
$P3
PR1
PR2
<> <>
P1'
$P2'
<>PR1'
V
V
V
V
V
SP2 V
SP1 V
WP2 V
WP3 V
WP1 V
V
コンパイル
モード
![Page 101: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/101.jpg)
P1
P2
$P3
PR1
PR2
<> <>
P1'
$P2'
<>PR1'
V
V
V
V
V
SP2 V
SP1 V
WP2 V
WP3 V
WP1 V
V
V
V
コンパイル
モード
![Page 102: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/102.jpg)
P1
P2
$P3
PR1
PR2
<> <>
P1'
$P2'
<>PR1'
V
V
V
V
V
SP2 V
SP1 V
WP2 V
WP3 V
WP1 V
V
V
V
<>CV
<>CV
コンポーネント#1の インタープロセス変数テーブル
コンポーネント#2の インタープロセス変数テーブル
コンパイル
モード
![Page 103: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/103.jpg)
P1
P2
$P3
PR1
PR2
<> <>
P1'
$P2'
<>PR1'
V
V
V
V
V
SP2 V
SP1 V
WP2 V
WP3 V
WP1 V
V
V
V
<>CV
<>CV
<>CV
<>CV
<>CV
<>CV
コンパイル
モード
![Page 104: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/104.jpg)
P1
P2
$P3
PR1
PR2
<> <>
P1'
$P2'
<>PR1'
V
V
V
V
V
SP2 V
SP1 V
WP2 V
WP3 V
WP1 V
V
V
V
CVCV
<>CV
<>CV
<>CV
<>CV
<>CV
<>CV
コンポーネント#1の プロセス変数テーブル
コンポーネント#2の プロセス変数テーブル
コンパイル
モード
![Page 105: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/105.jpg)
P1
P2
$P3
PR1
PR2
<> <>
P1'
$P2'
<>PR1'
V
V
V
V
V
SP2 V
SP1 V
WP2 V
WP3 V
WP1 V
V
V
V
CVCV
CVCV
CVCV
CVCV
CVCV
CVCV
CVCV
CVCV
CVCV
CVCV
CV CV
CV CV
CV CV
<>CV
<>CV
<>CV
<>CV
<>CV
<>CV
コンパイル
モード
![Page 106: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/106.jpg)
P1
P2
$P3
PR1
PR2
<> <>
P1'
$P2'
<>PR1'
V
V
V
V
V
SP2 V
SP1 V
WP2 V
WP3 V
WP1 V
V
V
V
CVCV
CVCV
CVCV
CVCV
CVCV
CVCV
CVCV
CVCV
CVCV
CVCV
CV CV
CV CV
CV CV
<>CV
<>CV
<>CV
<>CV
<>CV
<>CV
コンパイル
モード
プロセス変数テーブルのサイズに無頓着であってはいけない
![Page 107: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/107.jpg)
control the size of process variables table
![Page 108: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/108.jpg)
1
control the size of process variables table
![Page 109: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/109.jpg)
1
control the size of process variables table
![Page 110: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/110.jpg)
1
2
control the size of process variables table
![Page 111: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/111.jpg)
1
2
control the size of process variables table
![Page 112: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/112.jpg)
1
2
3
control the size of process variables table
![Page 113: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/113.jpg)
1
2
3
control the size of process variables table
![Page 114: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/114.jpg)
1
2
3
4
control the size of process variables table
![Page 115: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/115.jpg)
1
2
3
4
control the size of process variables table
![Page 116: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/116.jpg)
1
2
3
4
5
control the size of process variables table
![Page 117: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/117.jpg)
decrease the size of process variables table
![Page 118: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/118.jpg)
decrease the size of process variables table
1
![Page 119: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/119.jpg)
decrease the size of process variables table
1
![Page 120: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/120.jpg)
decrease the size of process variables table
1
![Page 121: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/121.jpg)
decrease the size of process variables table
1
![Page 122: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/122.jpg)
decrease the size of process variables table
1
2
![Page 123: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/123.jpg)
bOk bValid
bValidate b_Ok
buttonOK
decrease the size of process variables table
1
2
![Page 124: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/124.jpg)
decrease the size of process variables table
1
2
![Page 125: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/125.jpg)
decrease the size of process variables table
1
2
3
![Page 126: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/126.jpg)
decrease the size of process variables table
1
2
3
![Page 127: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/127.jpg)
decrease the size of process variables table
1
2
3
![Page 128: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/128.jpg)
decrease the size of process variables table
1
2
3
![Page 129: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/129.jpg)
decrease the size of process variables table
1
2
3
![Page 130: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/130.jpg)
decrease the size of process variables table
1
2
3
4
![Page 131: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/131.jpg)
decrease the size of process variables table
1
2
3
4
![Page 132: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/132.jpg)
decrease the size of process variables table
1
2
3
4
![Page 133: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/133.jpg)
decrease the size of process variables table
1
2
3
4
![Page 134: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/134.jpg)
use dynamic variables
![Page 135: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/135.jpg)
1
use dynamic variables
![Page 136: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/136.jpg)
1
2
use dynamic variables
![Page 137: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/137.jpg)
1
2
3
use dynamic variables
![Page 138: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/138.jpg)
1
2
3
use dynamic variables
![Page 139: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/139.jpg)
1
2
3
use dynamic variables
![Page 140: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/140.jpg)
1
2
3
use dynamic variables
![Page 141: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/141.jpg)
1
2
3
use dynamic variables
![Page 142: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/142.jpg)
don't push your luck
![Page 143: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/143.jpg)
don't push your luck
![Page 144: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/144.jpg)
don't push your luck
![Page 145: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/145.jpg)
don't push your luck
![Page 146: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/146.jpg)
プロセス変数を使っても⼤丈夫です!
don't push your luck
![Page 147: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/147.jpg)
プロセス変数を使っても⼤丈夫です!
ほんとう? それを聴いて安⼼した
don't push your luck
![Page 148: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/148.jpg)
プロセス変数を使っても⼤丈夫です!"最先端"であるためにコードを複雑にする必要はありません変数のサイズに気を配るのは⼤事ですが,極端に⾛らないで
don't push your luck
![Page 149: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/149.jpg)
プロセス変数を使っても⼤丈夫です!"最先端"であるためにコードを複雑にする必要はありません変数のサイズに気を配るのは⼤事ですが,極端に⾛らないで
それに今ならオブジェクト変数が…
don't push your luck
![Page 150: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/150.jpg)
group the variables in an object, you can
![Page 151: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/151.jpg)
無数のフォームローカル変数を オブジェクト型のプロセス変数に置換:
group the variables in an object, you can
![Page 152: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/152.jpg)
無数のフォームローカル変数を オブジェクト型のプロセス変数に置換:
{"onTimerMessage":"refresh", "PreviousFormEvent":27, "LastKeystroke":"C", "OnErrorMethodToRestore":"General_Error_Call", "OnEventMethodToRestore":"", "CountryCustomer":"FR", "CurrentQuoteUUID":"EF455411221114778AB3ED45DD", "ListOfCountryInWishList":["US","FR","UK","SA","AU"] }
group the variables in an object, you can
![Page 153: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/153.jpg)
無数のフォームローカル変数を オブジェクト型のプロセス変数に置換:
{"onTimerMessage":"refresh", "PreviousFormEvent":27, "LastKeystroke":"C", "OnErrorMethodToRestore":"General_Error_Call", "OnEventMethodToRestore":"", "CountryCustomer":"FR", "CurrentQuoteUUID":"EF455411221114778AB3ED45DD", "ListOfCountryInWishList":["US","FR","UK","SA","AU"] }
1個のプロセス変数に保存: form_context
group the variables in an object, you can
![Page 154: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/154.jpg)
無数のフォームローカル変数を オブジェクト型のプロセス変数に置換:
{"onTimerMessage":"refresh", "PreviousFormEvent":27, "LastKeystroke":"C", "OnErrorMethodToRestore":"General_Error_Call", "OnEventMethodToRestore":"", "CountryCustomer":"FR", "CurrentQuoteUUID":"EF455411221114778AB3ED45DD", "ListOfCountryInWishList":["US","FR","UK","SA","AU"] }
1個のプロセス変数に保存: form_context
プロセス変数テーブルに 16バイト追加することに
group the variables in an object, you can
![Page 155: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/155.jpg)
無数のフォームローカル変数を オブジェクト型のプロセス変数に置換:
{"onTimerMessage":"refresh", "PreviousFormEvent":27, "LastKeystroke":"C", "OnErrorMethodToRestore":"General_Error_Call", "OnEventMethodToRestore":"", "CountryCustomer":"FR", "CurrentQuoteUUID":"EF455411221114778AB3ED45DD", "ListOfCountryInWishList":["US","FR","UK","SA","AU"] }
1個のプロセス変数に保存: form_context
プロセス変数テーブルに 16バイト追加することに
わずか16バイトで整理できて⼤変お買い得!
group the variables in an object, you can
![Page 156: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/156.jpg)
無数のフォームローカル変数を オブジェクト型のプロセス変数に置換:
{"onTimerMessage":"refresh", "PreviousFormEvent":27, "LastKeystroke":"C", "OnErrorMethodToRestore":"General_Error_Call", "OnEventMethodToRestore":"", "CountryCustomer":"FR", "CurrentQuoteUUID":"EF455411221114778AB3ED45DD", "ListOfCountryInWishList":["US","FR","UK","SA","AU"] }
1個のプロセス変数に保存: form_context
プロセス変数テーブルに 16バイト追加することに
わずか16バイトで整理できて⼤変お買い得!
属性を追加するだけ拡張: フォームに オブジェクトを追加する必要なし
group the variables in an object, you can
![Page 157: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/157.jpg)
example with a form_context
![Page 158: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/158.jpg)
OB SET(form_context;"currentCountry";"France")
$ref:=Open form window("country_selector") DIALOG("country_selector") CLOSE WINDOW($ref )
$return_country:=OB Get(form_context;"currentCountry")
example with a form_context
![Page 159: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/159.jpg)
OB SET(form_context;"currentCountry";"France")
$ref:=Open form window("country_selector") DIALOG("country_selector") CLOSE WINDOW($ref )
$return_country:=OB Get(form_context;"currentCountry")
example with a form_context
![Page 160: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/160.jpg)
OB SET(form_context;"currentCountry";"France")
$ref:=Open form window("country_selector") DIALOG("country_selector") CLOSE WINDOW($ref )
$return_country:=OB Get(form_context;"currentCountry")
$evt:=Form event Case of : ($evt=On Load) $currentCountry:=OB Get(form_context;"currentCountry") ALL RECORDS([Country]) DISTINCT VALUES([Country]Continent;_continent) If ($currentCountry="") _continent:=1 OB SET(form_context;"onTimerMessage";"changeContinent") SET TIMER(-1) Else QUERY([Country];[Country]Name=$currentCountry) _continent:=Find in array(_continent;[Country]Continent) QUERY([Country];[Country]Continent=_continent{_continent}) DISTINCT VALUES([Country]Name;_country) _country:=Find in array(_country;$currentCountry) End if
: ($evt=On Timer) SET TIMER(0) $onTimerMessage:=OB Get(form_context;"onTimerMessage";Is text) OB REMOVE(form_context;"onTimerMessage") Case of : ($onTimerMessage="changeContinent") QUERY([Country];[Country]Continent=_continent{_continent}) DISTINCT VALUES([Country]Name;_country) _country:=1 End case End case
example with a form_context
![Page 161: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/161.jpg)
OB SET(form_context;"currentCountry";"France")
$ref:=Open form window("country_selector") DIALOG("country_selector") CLOSE WINDOW($ref )
$return_country:=OB Get(form_context;"currentCountry")
$evt:=Form event Case of : ($evt=On Load) $currentCountry:=OB Get(form_context;"currentCountry") ALL RECORDS([Country]) DISTINCT VALUES([Country]Continent;_continent) If ($currentCountry="") _continent:=1 OB SET(form_context;"onTimerMessage";"changeContinent") SET TIMER(-1) Else QUERY([Country];[Country]Name=$currentCountry) _continent:=Find in array(_continent;[Country]Continent) QUERY([Country];[Country]Continent=_continent{_continent}) DISTINCT VALUES([Country]Name;_country) _country:=Find in array(_country;$currentCountry) End if
: ($evt=On Timer) SET TIMER(0) $onTimerMessage:=OB Get(form_context;"onTimerMessage";Is text) OB REMOVE(form_context;"onTimerMessage") Case of : ($onTimerMessage="changeContinent") QUERY([Country];[Country]Continent=_continent{_continent}) DISTINCT VALUES([Country]Name;_country) _country:=1 End case End case
OB SET(form_context;"onTimerMessage";"changeContinent") SET TIMER(-1)
example with a form_context
![Page 162: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/162.jpg)
OB SET(form_context;"currentCountry";"France")
$ref:=Open form window("country_selector") DIALOG("country_selector") CLOSE WINDOW($ref )
$return_country:=OB Get(form_context;"currentCountry")
$evt:=Form event Case of : ($evt=On Load) $currentCountry:=OB Get(form_context;"currentCountry") ALL RECORDS([Country]) DISTINCT VALUES([Country]Continent;_continent) If ($currentCountry="") _continent:=1 OB SET(form_context;"onTimerMessage";"changeContinent") SET TIMER(-1) Else QUERY([Country];[Country]Name=$currentCountry) _continent:=Find in array(_continent;[Country]Continent) QUERY([Country];[Country]Continent=_continent{_continent}) DISTINCT VALUES([Country]Name;_country) _country:=Find in array(_country;$currentCountry) End if
: ($evt=On Timer) SET TIMER(0) $onTimerMessage:=OB Get(form_context;"onTimerMessage";Is text) OB REMOVE(form_context;"onTimerMessage") Case of : ($onTimerMessage="changeContinent") QUERY([Country];[Country]Continent=_continent{_continent}) DISTINCT VALUES([Country]Name;_country) _country:=1 End case End case
OB SET(form_context;"onTimerMessage";"changeContinent") SET TIMER(-1)
OB SET(form_context;"currentCountry";_country{_country}) ACCEPT
example with a form_context
![Page 163: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/163.jpg)
lighter is faster!
![Page 164: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/164.jpg)
don't use every possible fields
![Page 165: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/165.jpg)
don't use every possible fields
![Page 166: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/166.jpg)
こんにちは。150フィールドの者です。
don't use every possible fields
![Page 167: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/167.jpg)
こんにちは。150フィールドの者です。はじめまして!
don't use every possible fields
![Page 168: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/168.jpg)
こんにちは。150フィールドの者です。はじめまして!
いろんなケースに対応できるんですよ
don't use every possible fields
![Page 169: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/169.jpg)
こんにちは。150フィールドの者です。はじめまして!
いろんなケースに対応できるんですよ
ほんとうに?
don't use every possible fields
![Page 170: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/170.jpg)
こんにちは。150フィールドの者です。はじめまして!
いろんなケースに対応できるんですよ
ほんとうに?
もちろん! 想定シナリオを100%網羅していますから
don't use every possible fields
![Page 171: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/171.jpg)
こんにちは。150フィールドの者です。はじめまして!
いろんなケースに対応できるんですよ
ほんとうに?
もちろん! 想定シナリオを100%網羅していますから でも,⼤概は普通のケースですよね?
don't use every possible fields
![Page 172: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/172.jpg)
こんにちは。150フィールドの者です。はじめまして!
いろんなケースに対応できるんですよ
ほんとうに?
もちろん! 想定シナリオを100%網羅していますから でも,⼤概は普通のケースですよね?
備えあれば憂いなし,ってね!
don't use every possible fields
![Page 173: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/173.jpg)
こんにちは。150フィールドの者です。はじめまして!
いろんなケースに対応できるんですよ
ほんとうに?
もちろん! 想定シナリオを100%網羅していますから でも,⼤概は普通のケースですよね?
備えあれば憂いなし,ってね!
コスト的にはどうなの?
don't use every possible fields
![Page 174: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/174.jpg)
こんにちは。150フィールドの者です。はじめまして!
いろんなケースに対応できるんですよ
ほんとうに?
もちろん! 想定シナリオを100%網羅していますから でも,⼤概は普通のケースですよね?
備えあれば憂いなし,ってね!
コスト的にはどうなの?
未使⽤フィールドは空だからタダですよ
don't use every possible fields
![Page 175: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/175.jpg)
こんにちは。150フィールドの者です。はじめまして!
いろんなケースに対応できるんですよ
ほんとうに?
もちろん! 想定シナリオを100%網羅していますから でも,⼤概は普通のケースですよね?
備えあれば憂いなし,ってね!
コスト的にはどうなの?
未使⽤フィールドは空だからタダですよ
don't use every possible fields
![Page 176: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/176.jpg)
こんにちは。150フィールドの者です。はじめまして!
いろんなケースに対応できるんですよ
ほんとうに?
もちろん! 想定シナリオを100%網羅していますから でも,⼤概は普通のケースですよね?
備えあれば憂いなし,ってね!
コスト的にはどうなの?
未使⽤フィールドは空だからタダですよ
don't use every possible fields
![Page 177: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/177.jpg)
こんにちは。150フィールドの者です。はじめまして!
いろんなケースに対応できるんですよ
ほんとうに?
もちろん! 想定シナリオを100%網羅していますから でも,⼤概は普通のケースですよね?
備えあれば憂いなし,ってね!
コスト的にはどうなの?
未使⽤フィールドは空だからタダですよ
don't use every possible fields
![Page 178: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/178.jpg)
empty isn't free
![Page 179: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/179.jpg)
150フィールドのテーブルempty isn't free
![Page 180: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/180.jpg)
レコードのサイズ 150フィールドのテーブル
ヘッダー 32 バイト 32 バイト
データ 実際のサイズ 実際のサイズ
µストラクチャ 8 バイト×フィールド数 1,200 バイト
合計 最低 1.2 Kb レコード毎
150フィールドのテーブルempty isn't free
![Page 181: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/181.jpg)
レコードのサイズ 150フィールドのテーブル
ヘッダー 32 バイト 32 バイト
データ 実際のサイズ 実際のサイズ
µストラクチャ 8 バイト×フィールド数 1,200 バイト
合計 最低 1.2 Kb レコード毎
150フィールドのテーブルempty isn't free
![Page 182: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/182.jpg)
try to keep stable field sizes
![Page 183: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/183.jpg)
try to keep stable field sizes
![Page 184: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/184.jpg)
try to keep stable field sizes
![Page 185: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/185.jpg)
a
try to keep stable field sizes
![Page 186: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/186.jpg)
a
b
try to keep stable field sizes
![Page 187: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/187.jpg)
a
b
c
try to keep stable field sizes
![Page 188: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/188.jpg)
a
b
c
d
try to keep stable field sizes
![Page 189: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/189.jpg)
a
b
c
d
e
try to keep stable field sizes
![Page 190: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/190.jpg)
a
b
c
d
e
f
try to keep stable field sizes
![Page 191: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/191.jpg)
![Page 192: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/192.jpg)
![Page 193: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/193.jpg)
![Page 194: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/194.jpg)
a
![Page 195: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/195.jpg)
a
b
![Page 196: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/196.jpg)
a
b
c
![Page 197: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/197.jpg)
a
b
c
d
![Page 198: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/198.jpg)
a
b
c
d
e
![Page 199: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/199.jpg)
a
b
c
d
e
f
![Page 200: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/200.jpg)
a
b
c
d
e
f
g
![Page 201: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/201.jpg)
a
b
c
d
e
f
g
h
![Page 202: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/202.jpg)
"all you can store" syndrome
![Page 203: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/203.jpg)
"all you can store" syndrome
![Page 204: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/204.jpg)
"all you can store" syndrome
![Page 205: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/205.jpg)
"all you can store" syndrome
# フィールド
9 Phone1
10 Phone2
11 Fax
35 Phone3
90 Portable
105 email
120 email2
![Page 206: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/206.jpg)
"all you can store" syndrome
# フィールド
9 Phone1
10 Phone2
11 Fax
35 Phone3
90 Portable
105 email
120 email2
![Page 207: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/207.jpg)
"all you can store" syndrome
# フィールド
9 Phone1
10 Phone2
11 Fax
35 Phone3
90 Portable
105 email
120 email2
![Page 208: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/208.jpg)
"all you can store" syndrome
# フィールド
9 Phone1
10 Phone2
11 Fax
35 Phone3
90 Portable
105 email
120 email2
![Page 209: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/209.jpg)
"all you can store" syndrome
# フィールド
9 Phone1
10 Phone2
11 Fax
35 Phone3
90 Portable
105 email
120 email2
![Page 210: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/210.jpg)
"all you can store" syndrome
# フィールド
9 Phone1
10 Phone2
11 Fax
35 Phone3
90 Portable
105 email
120 email2
![Page 211: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/211.jpg)
"all you can store" syndrome
# フィールド
9 Phone1
10 Phone2
11 Fax
35 Phone3
90 Portable
105 email
120 email2
![Page 212: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/212.jpg)
"all you can store" syndrome
# フィールド
9 Phone1
10 Phone2
11 Fax
35 Phone3
90 Portable
105 email
120 email2
![Page 213: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/213.jpg)
"all you can store" syndrome
# フィールド
9 Phone1
10 Phone2
11 Fax
35 Phone3
90 Portable
105 email
120 email2
![Page 214: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/214.jpg)
you must unlearn what you have learned
![Page 215: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/215.jpg)
you must unlearn what you have learned
![Page 216: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/216.jpg)
SET AUTOMATIC RELATIONS SET FIELD RELATION
you must unlearn what you have learned
![Page 217: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/217.jpg)
SET AUTOMATIC RELATIONS SET FIELD RELATION
you must unlearn what you have learned
![Page 218: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/218.jpg)
SET AUTOMATIC RELATIONS SET FIELD RELATION
カレントプロセス内で有効
you must unlearn what you have learned
![Page 219: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/219.jpg)
SET AUTOMATIC RELATIONS SET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
you must unlearn what you have learned
![Page 220: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/220.jpg)
SET AUTOMATIC RELATIONS SET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
True, False Do not modify, Structure config., Manual, Automatic
you must unlearn what you have learned
![Page 221: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/221.jpg)
SET AUTOMATIC RELATIONS SET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
True, False Do not modify, Structure config., Manual, Automatic
ストラクチャー定義の⾃動リレーションは変更できない ストラクチャー定義の⾃動リレーションも変更できる
you must unlearn what you have learned
![Page 222: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/222.jpg)
SET AUTOMATIC RELATIONS SET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
True, False Do not modify, Structure config., Manual, Automatic
ストラクチャー定義の⾃動リレーションは変更できない ストラクチャー定義の⾃動リレーションも変更できる
"True" はリレーションをロックする;その場合 SET FIELD RELATION
は無視されてしまう副作⽤なし
you must unlearn what you have learned
![Page 223: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/223.jpg)
SET AUTOMATIC RELATIONS SET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
True, False Do not modify, Structure config., Manual, Automatic
ストラクチャー定義の⾃動リレーションは変更できない ストラクチャー定義の⾃動リレーションも変更できる
"True" はリレーションをロックする;その場合 SET FIELD RELATION
は無視されてしまう副作⽤なし
!
you must unlearn what you have learned
![Page 224: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/224.jpg)
SET AUTOMATIC RELATIONS SET FIELD RELATION
カレントプロセス内で有効
すべてのリレーションを変更する 1個のリレーションだけを変更する
True, False Do not modify, Structure config., Manual, Automatic
ストラクチャー定義の⾃動リレーションは変更できない ストラクチャー定義の⾃動リレーションも変更できる
"True" はリレーションをロックする;その場合 SET FIELD RELATION
は無視されてしまう副作⽤なし
!
互換性のために残されている 効率⾯で優れている
you must unlearn what you have learned
![Page 225: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/225.jpg)
you must unlearn what you have learned
![Page 226: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/226.jpg)
QUERY BY FORMULA QUERY BY FORMULAQUERY SELECTION BY FORMULA
you must unlearn what you have learned
![Page 227: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/227.jpg)
QUERY BY FORMULA QUERY BY FORMULA
インデックスを使⽤しないシーケンシャル検索 インデックス検索
QUERY SELECTION BY FORMULA
you must unlearn what you have learned
![Page 228: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/228.jpg)
QUERY BY FORMULA QUERY BY FORMULA
インデックスを使⽤しないシーケンシャル検索 インデックス検索
サーバー側でフォーミュラを評価クライアント側でフォーミュラ式を評価
QUERY SELECTION BY FORMULA
you must unlearn what you have learned
![Page 229: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/229.jpg)
QUERY BY FORMULA QUERY BY FORMULA
インデックスを使⽤しないシーケンシャル検索 インデックス検索
サーバー側でフォーミュラを評価
⾃動的にJOINを実⾏
クライアント側でフォーミュラ式を評価
レコード1件ずつクライアントに転送
JOINを定義して使⽤
QUERY SELECTION BY FORMULA
you must unlearn what you have learned
![Page 230: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/230.jpg)
QUERY BY FORMULA QUERY BY FORMULA
インデックスを使⽤しないシーケンシャル検索 インデックス検索
サーバー側でフォーミュラを評価
⾃動的にJOINを実⾏
クライアント側でフォーミュラ式を評価
レコード1件ずつクライアントに転送
JOINを定義して使⽤
以前のアドバイス : 利⽤は慎重に,できる限りQUERY
SELECTIONで対応
現在のアドバイス : v11の主要強化ポイントのひとつ
積極的に使⽤するべき!
QUERY SELECTION BY FORMULA
you must unlearn what you have learned
![Page 231: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/231.jpg)
you must unlearn what you have learned
![Page 232: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/232.jpg)
EXECUTE ON CLIENT EXECUTE ON CLIENTREGISTER CLIENT(name;period) REGISTER CLIENT(name)
you must unlearn what you have learned
![Page 233: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/233.jpg)
EXECUTE ON CLIENT EXECUTE ON CLIENTREGISTER CLIENT(name;period) REGISTER CLIENT(name)
登録後,クライアントは定期的に,デフォルトでは2秒毎に,サーバー あるいは別のクライアントから
呼び出されているか問い合わせる
サーバーは必要なときに実⾏リクエストを直接クライアントに送信する
you must unlearn what you have learned
![Page 234: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/234.jpg)
EXECUTE ON CLIENT EXECUTE ON CLIENTREGISTER CLIENT(name;period) REGISTER CLIENT(name)
登録後,クライアントは定期的に,デフォルトでは2秒毎に,サーバー あるいは別のクライアントから
呼び出されているか問い合わせる
サーバーは必要なときに実⾏リクエストを直接クライアントに送信する
PULLモード PUSHモード
you must unlearn what you have learned
![Page 235: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/235.jpg)
EXECUTE ON CLIENT EXECUTE ON CLIENTREGISTER CLIENT(name;period) REGISTER CLIENT(name)
登録後,クライアントは定期的に,デフォルトでは2秒毎に,サーバー あるいは別のクライアントから
呼び出されているか問い合わせる
サーバーは必要なときに実⾏リクエストを直接クライアントに送信する
PULLモード PUSHモード
⼤量リクエストの可能性 必要最低限のリクエスト数
you must unlearn what you have learned
![Page 236: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/236.jpg)
you must unlearn what you have learned
![Page 237: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/237.jpg)
TRIGGER TRIGGER
you must unlearn what you have learned
![Page 238: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/238.jpg)
TRIGGER TRIGGER
トリガはアトミックな操作: トリガが実⾏されている間,
サーバー側のコードがすべて待機トリガは実⾏中のコードを停⽌しない
you must unlearn what you have learned
![Page 239: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/239.jpg)
TRIGGER TRIGGER
トリガはアトミックな操作: トリガが実⾏されている間,
サーバー側のコードがすべて待機トリガは実⾏中のコードを停⽌しない
コマンドではなく関数
you must unlearn what you have learned
![Page 240: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/240.jpg)
TRIGGER TRIGGER
トリガはアトミックな操作: トリガが実⾏されている間,
サーバー側のコードがすべて待機トリガは実⾏中のコードを停⽌しない
コマンドではなく関数 C_LONGINT($0) $0:=0
you must unlearn what you have learned
![Page 241: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/241.jpg)
TRIGGER TRIGGER
トリガはアトミックな操作: トリガが実⾏されている間,
サーバー側のコードがすべて待機トリガは実⾏中のコードを停⽌しない
コマンドではなく関数 C_LONGINT($0) $0:=0
トリガコードでトランザクションを使⽤しない! エラーコード($0) を活⽤する
you must unlearn what you have learned
![Page 242: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/242.jpg)
at the end, house of cards falls
![Page 243: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/243.jpg)
$reference:=[Customer]ReferencePUSH RECORD([Customer])
QUERY([Customer];[Customer]Reference=$reference)$nb:=Records in selection([Customer])
POP RECORD([Customer])
If ($nb=0)//do something
end if
at the end, house of cards falls
![Page 244: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/244.jpg)
$reference:=[Customer]ReferencePUSH RECORD([Customer])
QUERY([Customer];[Customer]Reference=$reference)$nb:=Records in selection([Customer])
POP RECORD([Customer])
If ($nb=0)//do something
end if
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
at the end, house of cards falls
![Page 245: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/245.jpg)
$reference:=[Customer]ReferencePUSH RECORD([Customer])
QUERY([Customer];[Customer]Reference=$reference)$nb:=Records in selection([Customer])
POP RECORD([Customer])
If ($nb=0)//do something
end if
$reference:=[Customer]Reference
$recNum:=Find in field([Customer]Reference;$reference)
If ($recNum>=0)//do something
End if
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
at the end, house of cards falls
![Page 246: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/246.jpg)
$reference:=[Customer]ReferencePUSH RECORD([Customer])
QUERY([Customer];[Customer]Reference=$reference)$nb:=Records in selection([Customer])
POP RECORD([Customer])
If ($nb=0)//do something
end if
$reference:=[Customer]Reference
$recNum:=Find in field([Customer]Reference;$reference)
If ($recNum>=0)//do something
End if
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
Find in field でバッチリ解決!
at the end, house of cards falls
![Page 247: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/247.jpg)
at the end, house of cards falls
![Page 248: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/248.jpg)
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]BirthdayPUSH RECORD([Customer])
QUERY([Customer];[Customer]firstName=$firstName;*)QUERY([Customer];[Customer]lastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)$nb:=Records in selection([Customer])
POP RECORD([Customer])
If ($nb=0)//do something
End if
at the end, house of cards falls
![Page 249: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/249.jpg)
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]BirthdayPUSH RECORD([Customer])
QUERY([Customer];[Customer]firstName=$firstName;*)QUERY([Customer];[Customer]lastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)$nb:=Records in selection([Customer])
POP RECORD([Customer])
If ($nb=0)//do something
End if
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
at the end, house of cards falls
![Page 250: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/250.jpg)
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]BirthdayPUSH RECORD([Customer])
QUERY([Customer];[Customer]firstName=$firstName;*)QUERY([Customer];[Customer]lastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)$nb:=Records in selection([Customer])
POP RECORD([Customer])
If ($nb=0)//do something
End if
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]Birthday
SET QUERY DESTINATION(Into variable;$nb)QUERY([Customer];[Customer]FirstName=$firstName;*)QUERY([Customer];[Customer]LastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)SET QUERY DESTINATION(Into current selection)
If ($nb=0)//do something
End if
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
at the end, house of cards falls
![Page 251: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/251.jpg)
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]BirthdayPUSH RECORD([Customer])
QUERY([Customer];[Customer]firstName=$firstName;*)QUERY([Customer];[Customer]lastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)$nb:=Records in selection([Customer])
POP RECORD([Customer])
If ($nb=0)//do something
End if
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]Birthday
SET QUERY DESTINATION(Into variable;$nb)QUERY([Customer];[Customer]FirstName=$firstName;*)QUERY([Customer];[Customer]LastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)SET QUERY DESTINATION(Into current selection)
If ($nb=0)//do something
End if
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
SET QUERY DESTINATION カレントセレクション・レコードを変更せずにクエリを実⾏
at the end, house of cards falls
![Page 252: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/252.jpg)
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]BirthdayPUSH RECORD([Customer])
QUERY([Customer];[Customer]firstName=$firstName;*)QUERY([Customer];[Customer]lastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)$nb:=Records in selection([Customer])
POP RECORD([Customer])
If ($nb=0)//do something
End if
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]Birthday
SET QUERY DESTINATION(Into variable;$nb)QUERY([Customer];[Customer]FirstName=$firstName;*)QUERY([Customer];[Customer]LastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)SET QUERY DESTINATION(Into current selection)
If ($nb=0)//do something
End if
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]BirthdaySET QUERY LIMIT(1)SET QUERY DESTINATION(Into variable;$nb)QUERY([Customer];[Customer]FirstName=$firstName;*)QUERY([Customer];[Customer]LastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)SET QUERY DESTINATION(Into current selection)SET QUERY LIMIT(0)If ($nb=0)
//do somethingEnd if
SET QUERY DESTINATION カレントセレクション・レコードを変更せずにクエリを実⾏
at the end, house of cards falls
![Page 253: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/253.jpg)
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]BirthdayPUSH RECORD([Customer])
QUERY([Customer];[Customer]firstName=$firstName;*)QUERY([Customer];[Customer]lastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)$nb:=Records in selection([Customer])
POP RECORD([Customer])
If ($nb=0)//do something
End if
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]Birthday
SET QUERY DESTINATION(Into variable;$nb)QUERY([Customer];[Customer]FirstName=$firstName;*)QUERY([Customer];[Customer]LastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)SET QUERY DESTINATION(Into current selection)
If ($nb=0)//do something
End if
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
$firstName:=[Customer]FirstName$lastName:=[Customer]LastName$birthday:=[Customer]BirthdaySET QUERY LIMIT(1)SET QUERY DESTINATION(Into variable;$nb)QUERY([Customer];[Customer]FirstName=$firstName;*)QUERY([Customer];[Customer]LastName=$lastName;*)QUERY([Customer];[Customer]Birthday=$birthday)SET QUERY DESTINATION(Into current selection)SET QUERY LIMIT(0)If ($nb=0)
//do somethingEnd if
SET QUERY LIMIT 0 でリミットを解除
SET QUERY DESTINATION カレントセレクション・レコードを変更せずにクエリを実⾏
at the end, house of cards falls
![Page 254: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/254.jpg)
at the end, house of cards falls
![Page 255: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/255.jpg)
$reference:=[Customer]ReferencePUSH RECORD([Customer])
QUERY([Customer];[Customer]Reference=$reference)$firstName:=[Customer]FirstName$lastName:=[Customer]LastName
POP RECORD([Customer])
//do something with $firstName, $lastName ...
at the end, house of cards falls
![Page 256: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/256.jpg)
$reference:=[Customer]ReferencePUSH RECORD([Customer])
QUERY([Customer];[Customer]Reference=$reference)$firstName:=[Customer]FirstName$lastName:=[Customer]LastName
POP RECORD([Customer])
//do something with $firstName, $lastName ...
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
at the end, house of cards falls
![Page 257: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/257.jpg)
$reference:=[Customer]ReferencePUSH RECORD([Customer])
QUERY([Customer];[Customer]Reference=$reference)$firstName:=[Customer]FirstName$lastName:=[Customer]LastName
POP RECORD([Customer])
//do something with $firstName, $lastName ...
$reference:=[Customer]Reference$firstName:=""$lastName:=""
Begin SQLselect FirstName, LastName from Customerwhere Reference=:$referenceinto :$firstName, :$lastName
End SQL
//do something with $firstName, $lastName ...
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
at the end, house of cards falls
![Page 258: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/258.jpg)
$reference:=[Customer]ReferencePUSH RECORD([Customer])
QUERY([Customer];[Customer]Reference=$reference)$firstName:=[Customer]FirstName$lastName:=[Customer]LastName
POP RECORD([Customer])
//do something with $firstName, $lastName ...
$reference:=[Customer]Reference$firstName:=""$lastName:=""
Begin SQLselect FirstName, LastName from Customerwhere Reference=:$referenceinto :$firstName, :$lastName
End SQL
//do something with $firstName, $lastName ...
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
SQL カレントセレクション・レコードを 変更せずにレコードの値を取り出すことができる
at the end, house of cards falls
![Page 259: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/259.jpg)
$reference:=[Customer]ReferencePUSH RECORD([Customer])
QUERY([Customer];[Customer]Reference=$reference)$firstName:=[Customer]FirstName$lastName:=[Customer]LastName
POP RECORD([Customer])
//do something with $firstName, $lastName ...
$reference:=[Customer]Reference$firstName:=""$lastName:=""
Begin SQLselect FirstName, LastName from Customerwhere Reference=:$referenceinto :$firstName, :$lastName
End SQL
//do something with $firstName, $lastName ...
PUSH / POP ロジックはとても⾼価な処理 セレクション変更・クエリ・メモリの読み書き…
SQL カレントセレクション・レコードを 変更せずにレコードの値を取り出すことができる
別⾔語の使⽤は⾃由!
at the end, house of cards falls
![Page 260: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/260.jpg)
a little more knowledge lights our way
![Page 261: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/261.jpg)
QUERY([Customer];[Customer]LastName="Skywalker")CREATE SET([Customer];"SkywalkerFamilly")
a little more knowledge lights our way
![Page 262: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/262.jpg)
QUERY([Customer];[Customer]LastName="Skywalker")CREATE SET([Customer];"SkywalkerFamilly")
QUERY+CREATE SET: 2度のネットワーク通信・カレントセレクションの変更・カレントレコードの
変更・カレントレコードのロック
a little more knowledge lights our way
![Page 263: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/263.jpg)
QUERY([Customer];[Customer]LastName="Skywalker")CREATE SET([Customer];"SkywalkerFamilly")
SET QUERY DESTINATION(Into set;"SkywalkerFamilly")QUERY([Customer];[Customer]LastName="Skywalker")SET QUERY DESTINATION(Into current selection)
QUERY+CREATE SET: 2度のネットワーク通信・カレントセレクションの変更・カレントレコードの
変更・カレントレコードのロック
a little more knowledge lights our way
![Page 264: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/264.jpg)
QUERY([Customer];[Customer]LastName="Skywalker")CREATE SET([Customer];"SkywalkerFamilly")
SET QUERY DESTINATION(Into set;"SkywalkerFamilly")QUERY([Customer];[Customer]LastName="Skywalker")SET QUERY DESTINATION(Into current selection)
QUERY+CREATE SET: 2度のネットワーク通信・カレントセレクションの変更・カレントレコードの
変更・カレントレコードのロック
SET QUERY DESTINATION+QUERY: 1度のネットワーク通信・セットを作成するだけ
a little more knowledge lights our way
![Page 265: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/265.jpg)
the sounds of silence, respect you must
![Page 266: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/266.jpg)
ARRAY TEXT(<>arrayParameter;0)
the sounds of silence, respect you must
![Page 267: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/267.jpg)
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("parameters"))IDLE
End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
the sounds of silence, respect you must
![Page 268: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/268.jpg)
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("parameters"))IDLE
End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
"parameters" はグローバルセマフォ
the sounds of silence, respect you must
![Page 269: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/269.jpg)
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("parameters"))IDLE
End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
"parameters" はグローバルセマフォ
"<>arrayParameters" は インタープロセス変数
the sounds of silence, respect you must
![Page 270: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/270.jpg)
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("parameters"))IDLE
End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
"parameters" はグローバルセマフォ
"<>arrayParameters" は インタープロセス変数
サーバー側で管理
the sounds of silence, respect you must
![Page 271: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/271.jpg)
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("parameters"))IDLE
End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
"parameters" はグローバルセマフォ
"<>arrayParameters" は インタープロセス変数
サーバー側で管理
クライアント側で管理
the sounds of silence, respect you must
![Page 272: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/272.jpg)
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("parameters"))IDLE
End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
"parameters" はグローバルセマフォ
"<>arrayParameters" は インタープロセス変数
サーバー側で管理
クライアント側で管理
the sounds of silence, respect you must
![Page 273: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/273.jpg)
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("parameters"))IDLE
End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
貴様はテロリストか!
"parameters" はグローバルセマフォ
"<>arrayParameters" は インタープロセス変数
サーバー側で管理
クライアント側で管理
the sounds of silence, respect you must
![Page 274: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/274.jpg)
While (Semaphore("parameters")) IDLE End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
ARRAY TEXT(<>arrayParameter;0)
the sounds of silence, respect you must
![Page 275: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/275.jpg)
While (Semaphore("parameters")) IDLE End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("$parameters";500)) IDLE End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("$parameters")
the sounds of silence, respect you must
![Page 276: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/276.jpg)
While (Semaphore("parameters")) IDLE End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("$parameters";500)) IDLE End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("$parameters")
"$parameters" はローカルセマフォ
the sounds of silence, respect you must
![Page 277: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/277.jpg)
While (Semaphore("parameters")) IDLE End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("$parameters";500)) IDLE End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("$parameters")
"$parameters" はローカルセマフォクライアント側で管理
the sounds of silence, respect you must
![Page 278: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/278.jpg)
While (Semaphore("parameters")) IDLE End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("parameters")
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("$parameters";500)) IDLE End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("$parameters")
"$parameters" はローカルセマフォクライアント側で管理
セマフォがセットされるまで500tick待機する
the sounds of silence, respect you must
![Page 279: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/279.jpg)
ARRAY TEXT(<>arrayParameter;0)
While (Semaphore("$parameters";500)) IDLE End while
APPEND TO ARRAY(<>arrayParameter;$newValue)
CLEAR SEMAPHORE("$parameters")
"$parameters" はローカルセマフォクライアント側で管理
セマフォがセットされるまで500tick待機する
型をしっかり憶えましょう🙂
the sounds of silence, respect you must
![Page 280: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/280.jpg)
still remains within the sound of silence
![Page 281: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/281.jpg)
still remains within the sound of silence
![Page 282: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/282.jpg)
リストボックス#1 セレクション, 特殊型
リストボックス#2 セレクション, 汎⽤型
still remains within the sound of silence
![Page 283: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/283.jpg)
リストボックス#1 セレクション, 特殊型
リストボックス#2 セレクション, 汎⽤型
still remains within the sound of silence
![Page 284: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/284.jpg)
リストボックス#1 セレクション, 特殊型
リストボックス#2 セレクション, 汎⽤型
still remains within the sound of silence
![Page 285: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/285.jpg)
リストボックス#1 セレクション, 特殊型
リストボックス#2 セレクション, 汎⽤型
still remains within the sound of silence
![Page 286: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/286.jpg)
リストボックス#1 セレクション, 特殊型
リストボックス#2 セレクション, 汎⽤型
still remains within the sound of silence
![Page 287: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/287.jpg)
リストボックス#1 セレクション, 特殊型
リストボックス#2 セレクション, 汎⽤型
ハイライトセットは必要がある場合にだけ設定 セットの名前に注意を払うこと
still remains within the sound of silence
![Page 288: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/288.jpg)
kill good old generic
![Page 289: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/289.jpg)
//$sum:=Array_Sum(->myArray) C_POINTER($1;$array) C_REAL($0)
$array:=$1
ASSERT(\ (Type($array->)=Real array)\ | (Type($array->)=LongInt array)\ | (Type($array->)=Integer array)\ ;"Array must be a numeric")
$sum:=0 For ($i;1;Size of array($array->)) $sum:=$sum+$array->{$i} End for
$0:=$sum
kill good old generic
![Page 290: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/290.jpg)
//$sum:=Array_Sum(->myArray) C_POINTER($1;$array) C_REAL($0)
$array:=$1
ASSERT(\ (Type($array->)=Real array)\ | (Type($array->)=LongInt array)\ | (Type($array->)=Integer array)\ ;"Array must be a numeric")
$sum:=0 For ($i;1;Size of array($array->)) $sum:=$sum+$array->{$i} End for
$0:=$sum
$sum:=Sum(myArray)
kill good old generic
![Page 291: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/291.jpg)
//$sum:=Array_Sum(->myArray) C_POINTER($1;$array) C_REAL($0)
$array:=$1
ASSERT(\ (Type($array->)=Real array)\ | (Type($array->)=LongInt array)\ | (Type($array->)=Integer array)\ ;"Array must be a numeric")
$sum:=0 For ($i;1;Size of array($array->)) $sum:=$sum+$array->{$i} End for
$0:=$sum
$sum:=Sum(myArray)
v13以降,"Sum" "Min" "Max" などの統計関数は配列に対応
kill good old generic
![Page 292: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/292.jpg)
kill good old generic, you can
![Page 293: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/293.jpg)
ReadWrite(->[Contact])
kill good old generic, you can
![Page 294: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/294.jpg)
//ReadWrite(->table) C_POINTER($1;$table)
$table:=$1
If (Read only state($table->)) READ WRITE($table->) End if
ReadWrite(->[Contact])
kill good old generic, you can
![Page 295: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/295.jpg)
//ReadWrite(->table) C_POINTER($1;$table)
$table:=$1
If (Read only state($table->)) READ WRITE($table->) End if
ReadWrite(->[Contact])
v2004では,サーバーをコールしたので,READ WRITEを実⾏する前に 状態を調べることは有⽤だった
kill good old generic, you can
![Page 296: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/296.jpg)
//ReadWrite(->table) C_POINTER($1;$table)
$table:=$1
If (Read only state($table->)) READ WRITE($table->) End if
ReadWrite(->[Contact])
READ WRITE([Contact])
v2004では,サーバーをコールしたので,READ WRITEを実⾏する前に 状態を調べることは有⽤だった
kill good old generic, you can
![Page 297: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/297.jpg)
//ReadWrite(->table) C_POINTER($1;$table)
$table:=$1
If (Read only state($table->)) READ WRITE($table->) End if
ReadWrite(->[Contact])
READ WRITE([Contact])
v2004では,サーバーをコールしたので,READ WRITEを実⾏する前に 状態を調べることは有⽤だった
v11以降,リクエストがサーバーに 送信されるまでREAD WRITEは
保留されるようになったのでこれで良い
kill good old generic, you can
![Page 298: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/298.jpg)
//ReadWrite(->table) C_POINTER($1;$table)
$table:=$1
If (Read only state($table->)) READ WRITE($table->) End if
ReadWrite(->[Contact])
READ WRITE([Contact])
v2004では,サーバーをコールしたので,READ WRITEを実⾏する前に 状態を調べることは有⽤だった
v11以降,リクエストがサーバーに 送信されるまでREAD WRITEは
保留されるようになったのでこれで良い
毎回のアップグレード後に必ずチェックするべき項⽬のひとつ
kill good old generic, you can
![Page 299: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/299.jpg)
//ReadWrite(->table) C_POINTER($1;$table)
$table:=$1
If (Read only state($table->)) READ WRITE($table->) End if
ReadWrite(->[Contact])
READ WRITE([Contact])
v2004では,サーバーをコールしたので,READ WRITEを実⾏する前に 状態を調べることは有⽤だった
v11以降,リクエストがサーバーに 送信されるまでREAD WRITEは
保留されるようになったのでこれで良い
毎回のアップグレード後に必ずチェックするべき項⽬のひとつ
何年も開いていない汎⽤コードは腐った⾷品と同じ: 捨てるか運を天に任せるか
kill good old generic, you can
![Page 300: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/300.jpg)
//ReadWrite(->table) C_POINTER($1;$table)
$table:=$1
If (Read only state($table->)) READ WRITE($table->) End if
ReadWrite(->[Contact])
READ WRITE([Contact])
v2004では,サーバーをコールしたので,READ WRITEを実⾏する前に 状態を調べることは有⽤だった
v11以降,リクエストがサーバーに 送信されるまでREAD WRITEは
保留されるようになったのでこれで良い
毎回のアップグレード後に必ずチェックするべき項⽬のひとつ
何年も開いていない汎⽤コードは腐った⾷品と同じ: 捨てるか運を天に任せるか
汎⽤コードがまとめられたコンポーネントも忘れずにチェックすること
kill good old generic, you can
![Page 301: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/301.jpg)
respect the name, you should
![Page 302: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/302.jpg)
$ID_Process:=Execute on server("MySrvProcessMethod";0;"MySrvProcessMethod"+<>myLogin+"_"+string(<>customerID))
respect the name, you should
![Page 303: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/303.jpg)
$ID_Process:=Execute on server("MySrvProcessMethod";0;"MySrvProcessMethod"+<>myLogin+"_"+string(<>customerID))
$ID_Process:=New process("MyProcessMethod";0;"MyProcessMethod"+<>myLogin+"_"+string(<>customerID))
respect the name, you should
![Page 304: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/304.jpg)
$ID_Process:=Execute on server("MySrvProcessMethod";0;"MySrvProcessMethod"+<>myLogin+"_"+string(<>customerID))
$ID_Process:=New process("MyProcessMethod";0;"MyProcessMethod"+<>myLogin+"_"+string(<>customerID))
プロセス名は容器ではありません
respect the name, you should
![Page 305: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/305.jpg)
$ID_Process:=Execute on server("MySrvProcessMethod";0;"MySrvProcessMethod"+<>myLogin+"_"+string(<>customerID))
$ID_Process:=Execute on server("MySrvProcessMethod";0;"MySrvProcessMethod";<>myLogin;<>customerID)
$ID_Process:=New process("MyProcessMethod";0;"MyProcessMethod"+<>myLogin+"_"+string(<>customerID))
プロセス名は容器ではありません
$ID_Process:=New process("MyProcessMethod";0;"MyProcessMethod";<>myLogin;<>customerID)
respect the name, you should
![Page 306: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/306.jpg)
$ID_Process:=Execute on server("MySrvProcessMethod";0;"MySrvProcessMethod"+<>myLogin+"_"+string(<>customerID))
$ID_Process:=Execute on server("MySrvProcessMethod";0;"MySrvProcessMethod";<>myLogin;<>customerID)
$ID_Process:=New process("MyProcessMethod";0;"MyProcessMethod"+<>myLogin+"_"+string(<>customerID))
プロセス名は容器ではありません
$ID_Process:=New process("MyProcessMethod";0;"MyProcessMethod";<>myLogin;<>customerID)
パラメーター群をサーバーに転送明快なプロセス名
respect the name, you should
![Page 307: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/307.jpg)
$ID_Process:=Execute on server("MySrvProcessMethod";0;"MySrvProcessMethod"+<>myLogin+"_"+string(<>customerID))
$ID_Process:=Execute on server("MySrvProcessMethod";0;"MySrvProcessMethod";<>myLogin;<>customerID)
$ID_Process:=New process("MyProcessMethod";0;"MyProcessMethod"+<>myLogin+"_"+string(<>customerID))
プロセス名は容器ではありません
$ID_Process:=New process("MyProcessMethod";0;"MyProcessMethod";<>myLogin;<>customerID)
パラメーター群をサーバーに転送明快なプロセス名
奇妙または気まぐれに考案された名前では将来のログ解析が困難に
respect the name, you should
![Page 308: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/308.jpg)
$ID_Process:=Execute on server("MySrvProcessMethod";0;"MySrvProcessMethod"+<>myLogin+"_"+string(<>customerID))
$ID_Process:=Execute on server("MySrvProcessMethod";0;"MySrvProcessMethod";<>myLogin;<>customerID)
$ID_Process:=New process("MyProcessMethod";0;"MyProcessMethod"+<>myLogin+"_"+string(<>customerID))
プロセス名は容器ではありません
$ID_Process:=New process("MyProcessMethod";0;"MyProcessMethod";<>myLogin;<>customerID)
パラメーター群をサーバーに転送明快なプロセス名
奇妙または気まぐれに考案された名前では将来のログ解析が困難に
今⾵に,コンテキスト情報はオブジェクト1個で渡せば良い
respect the name, you should
![Page 309: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/309.jpg)
brothers but not twins …
![Page 310: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/310.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
brothers but not twins …
![Page 311: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/311.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while
brothers but not twins …
![Page 312: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/312.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while
"Execute on server" メソッドに引数を渡せば良い brothers but not twins …
![Page 313: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/313.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while
"Execute on server" メソッドに引数を渡せば良い
1回にまとめられる
brothers but not twins …
![Page 314: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/314.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while
"Execute on server" メソッドに引数を渡せば良い
1回にまとめられる
"息継ぎ"する時間がない
brothers but not twins …
![Page 315: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/315.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while
"Execute on server" メソッドに引数を渡せば良い
1回にまとめられる
"息継ぎ"する時間がない
パラメーターをコマンドに直接 渡すことは避けたほうが良い
brothers but not twins …
![Page 316: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/316.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while //myReallyOptimizedMethodSrv
$customer_ID:=$1 // 結果を計算する $result:=.... $0:=$result
brothers but not twins …
![Page 317: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/317.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while //myReallyOptimizedMethodSrv
$customer_ID:=$1 // 結果を計算する $result:=.... $0:=$result
brothers but not twins …
![Page 318: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/318.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while //myReallyOptimizedMethodSrv
$customer_ID:=$1 // 結果を計算する $result:=.... $0:=$result
brothers but not twins …
![Page 319: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/319.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while //myReallyOptimizedMethodSrv
$customer_ID:=$1 // 結果を計算する $result:=.... $0:=$result
brothers but not twins …
![Page 320: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/320.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while //myReallyOptimizedMethodSrv
$customer_ID:=$1 // 結果を計算する $result:=.... $0:=$result
brothers but not twins …
![Page 321: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/321.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while //myReallyOptimizedMethodSrv
$customer_ID:=$1 // 結果を計算する $result:=.... $0:=$result
"Execute on server"コマンドは⾮同期コール
brothers but not twins …
![Page 322: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/322.jpg)
$process_srv_id:=Execute on server("myOptimizedMethodSrv";0;"myOptimizedMethodSrv") SET PROCESS VARIABLE($process_srv_id;customer_ID;$1) $calculation_launch:=True SET PROCESS VARIABLE($process_srv_id;calculation_launch;$calculation_launch) $calculation_finished:=False Repeat GET PROCESS VARIABLE($process_srv_id;calculation_finished;$calculation_finished) GET PROCESS VARIABLE($process_srv_id;Result;$Result) Until ($calculation_finished) $calculation_kill:=true SET PROCESS VARIABLE($process_srv_id;calculation_kill;$calculation_kill)
// myOptimizedMethodSrv calculation_launch:=False calculation_finished:=False calculation_kill:=False customer_ID:=0 while( not(calculation_launch)) DELAY PROCESS(Current process;1) End while
// 結果を計算する Result:=....
calculation_finished:=True While (Not(calculation_kill)) DELAY PROCESS(Current process;1) End while //myReallyOptimizedMethodSrv
$customer_ID:=$1 // 結果を計算する $result:=.... $0:=$result
"Execute on server"コマンドは⾮同期コール
"サーバー上で実⾏"メソッド属性は同期コール
brothers but not twins …
![Page 323: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/323.jpg)
it's free, use it!
![Page 324: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/324.jpg)
composite indexes, try you must
![Page 325: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/325.jpg)
筆者がこれまで コンサルティング依頼を
受けたデータベース
composite indexes, try you must
![Page 326: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/326.jpg)
筆者がこれまで コンサルティング依頼を
受けたデータベース
複合インデックスが 活⽤されていた
データベースの割合
composite indexes, try you must
![Page 327: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/327.jpg)
筆者がこれまで コンサルティング依頼を
受けたデータベース
複合インデックスが 活⽤されていた
データベースの割合複合インデックスはクエリや並び替えの速度を劇的に改善する可能性がある
composite indexes, try you must
![Page 328: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/328.jpg)
筆者がこれまで コンサルティング依頼を
受けたデータベース
複合インデックスが 活⽤されていた
データベースの割合複合インデックスはクエリや並び替えの速度を劇的に改善する可能性がある
恩恵にあずかるためにコードを変更する必要はなく, 定義するだけで良い
composite indexes, try you must
![Page 329: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/329.jpg)
indexes are not only automatic
![Page 330: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/330.jpg)
indexes are not only automatic
![Page 331: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/331.jpg)
ポップアップをクリックしてインデックスの種類を選択
indexes are not only automatic
![Page 332: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/332.jpg)
ポップアップをクリックしてインデックスの種類を選択
少し時間を取ってインデックス設定を⾒直せば,全体の速度を向上させられる
indexes are not only automatic
![Page 333: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/333.jpg)
ポップアップをクリックしてインデックスの種類を選択
少し時間を取ってインデックス設定を⾒直せば,全体の速度を向上させられる
クラスターを使⽤すればサイズを⼤幅に節約することができ,特に対価はない
indexes are not only automatic
![Page 334: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/334.jpg)
if no mistake have you made, yet losing you are …
![Page 335: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/335.jpg)
DESCRIBE QUERY EXECUTION(True)
QUERY BY FORMULA([Flight];([Airport]IATA_AirportCode="SFO")\ & ([Flight]UUID_Line=[Line]UUID) & ([Line]UUID_Airport_To=[Airport]UUID))
$path:=Get last query path(Description in text format) SET TEXT TO PASTEBOARD($path)
DESCRIBE QUERY EXECUTION(False)
if no mistake have you made, yet losing you are …
![Page 336: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/336.jpg)
DESCRIBE QUERY EXECUTION(True)
QUERY BY FORMULA([Flight];([Airport]IATA_AirportCode="SFO")\ & ([Flight]UUID_Line=[Line]UUID) & ([Line]UUID_Airport_To=[Airport]UUID))
$path:=Get last query path(Description in text format) SET TEXT TO PASTEBOARD($path)
DESCRIBE QUERY EXECUTION(False)
クエリプランとクエリパスで視点をエンジンルーム内に移動
if no mistake have you made, yet losing you are …
![Page 337: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/337.jpg)
DESCRIBE QUERY EXECUTION(True)
QUERY BY FORMULA([Flight];([Airport]IATA_AirportCode="SFO")\ & ([Flight]UUID_Line=[Line]UUID) & ([Line]UUID_Airport_To=[Airport]UUID))
$path:=Get last query path(Description in text format) SET TEXT TO PASTEBOARD($path)
DESCRIBE QUERY EXECUTION(False)
クエリプランとクエリパスで視点をエンジンルーム内に移動
優れたクエリを書くため,時には直感を働かせることも必要
if no mistake have you made, yet losing you are …
![Page 338: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/338.jpg)
do not reinvent the wheel, a different game you should play
![Page 339: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/339.jpg)
do not reinvent the wheel, a different game you should play
![Page 340: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/340.jpg)
do not reinvent the wheel, a different game you should play
![Page 341: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/341.jpg)
do not reinvent the wheel, a different game you should play
![Page 342: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/342.jpg)
do not reinvent the wheel, a different game you should play
![Page 343: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/343.jpg)
do not reinvent the wheel, a different game you should play
![Page 344: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/344.jpg)
オブジェクトライブラリで時間を節約・デザインを統⼀・アイデアを共有
do not reinvent the wheel, a different game you should play
![Page 345: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/345.jpg)
オブジェクトライブラリで時間を節約・デザインを統⼀・アイデアを共有
ライセンス不要,使⽤に制約なし!
do not reinvent the wheel, a different game you should play
![Page 346: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/346.jpg)
4D helps your progress
![Page 347: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/347.jpg)
4D helps your progress
![Page 348: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/348.jpg)
4D helps your progress
![Page 349: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/349.jpg)
Mr Smith
VAT rate
4D helps your progress
![Page 350: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/350.jpg)
$id_progress:=Progress New Progress SET BUTTON ENABLED ($id_progress;True) Progress SET TITLE ($id_progress;"Update customers";0;"";True) ALL RECORDS([Customer]) $j:=0 $nb:=Records in table([Customer]) While (Not(End selection([Customer]))) & (Not(Progress Stopped ($id_progress))) $j:=$j+1 Progress SET PROGRESS ($id_progress;$j/$nb;[Customer]name)
/// ...
NEXT RECORD([Customer]) End while
Progress QUIT ($id_progress)
Mr Smith
VAT rate
4D helps your progress
![Page 351: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/351.jpg)
$id_progress:=Progress New Progress SET BUTTON ENABLED ($id_progress;True) Progress SET TITLE ($id_progress;"Update customers";0;"";True) ALL RECORDS([Customer]) $j:=0 $nb:=Records in table([Customer]) While (Not(End selection([Customer]))) & (Not(Progress Stopped ($id_progress))) $j:=$j+1 Progress SET PROGRESS ($id_progress;$j/$nb;[Customer]name)
/// ...
NEXT RECORD([Customer]) End while
Progress QUIT ($id_progress)
Mr Smith
VAT rate
$id_progress:=Progress New Progress SET BUTTON ENABLED ($id_progress;True) Progress SET TITLE ($id_progress;"Apply new parameter";0;"";True) ALL RECORDS([Param]) $j:=0 $nb:=Records in table([Param]) While (Not(End selection([Param]))) & (Not(Progress Stopped ($id_progress))) $j:=$j+1 Progress SET PROGRESS ($id_progress;$j/$nb;[Param]name)
/// ...
NEXT RECORD([Param]) End while
Progress QUIT ($id_progress)
4D helps your progress
![Page 352: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/352.jpg)
$id_progress:=Progress New Progress SET BUTTON ENABLED ($id_progress;True) Progress SET TITLE ($id_progress;"Update customers";0;"";True) ALL RECORDS([Customer]) $j:=0 $nb:=Records in table([Customer]) While (Not(End selection([Customer]))) & (Not(Progress Stopped ($id_progress))) $j:=$j+1 Progress SET PROGRESS ($id_progress;$j/$nb;[Customer]name)
/// ...
NEXT RECORD([Customer]) End while
Progress QUIT ($id_progress)
Mr Smith
VAT rate
$id_progress:=Progress New Progress SET BUTTON ENABLED ($id_progress;True) Progress SET TITLE ($id_progress;"Apply new parameter";0;"";True) ALL RECORDS([Param]) $j:=0 $nb:=Records in table([Param]) While (Not(End selection([Param]))) & (Not(Progress Stopped ($id_progress))) $j:=$j+1 Progress SET PROGRESS ($id_progress;$j/$nb;[Param]name)
/// ...
NEXT RECORD([Param]) End while
Progress QUIT ($id_progress)おすすめ:
ループ10回毎にメソッドをコールする
4D helps your progress
![Page 353: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/353.jpg)
don't keep a dog and bark yourself!
![Page 354: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/354.jpg)
don't keep a dog and bark yourself!
![Page 355: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/355.jpg)
C_POINTER($1;$2)C_LONGINT($nb_total)
ARRAY TEXT($_result;0x0000)CLEAR VARIABLE($nb_total)
$nb:=Size of array($1->)For ($i;1;$nb)
If (Length($1->{$i})=0)Else
APPEND TO ARRAY($_result;$1->{$i})$nb_total:=$nb_total+1
End ifEnd for
COPY ARRAY($_result;$2->)
don't keep a dog and bark yourself!
![Page 356: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/356.jpg)
C_POINTER($1;$2)C_LONGINT($nb_total)
ARRAY TEXT($_result;0x0000)CLEAR VARIABLE($nb_total)
$nb:=Size of array($1->)For ($i;1;$nb)
If (Length($1->{$i})=0)Else
APPEND TO ARRAY($_result;$1->{$i})$nb_total:=$nb_total+1
End ifEnd for
COPY ARRAY($_result;$2->)
がんばり過ぎ〜$nb_total:=0
のほうが⾃然なのに
この変数は要らないのでは
$1->{$i}="" よりも 優れているのかなぁ?=0 / Else よりも #0 のほうが
シンプルじゃないの?
don't keep a dog and bark yourself!
![Page 357: Code Optimisation](https://reader031.vdocuments.net/reader031/viewer/2022011722/58ee78461a28ab7f598b456b/html5/thumbnails/357.jpg)
Antoine de Saint Exupéry
La perfection est atteinte, non pas lorsqu'il n'y a plus rien à ajouter, mais lorsqu'il n'y a plus rien à retirer.
Wind, Sand and Stars (1939)