Все тесты проводил на стареньком ноутбуке.
Схема 1 (31 секунда)
Add(MainForm,3063237,161,112)
{
Width=407
Height=675
link(onCreate,3918577:doFor,[(277,132)(277,202)])
}
Add(StrList,4383086,371,196)
{
}
Add(ArrayEnum,1976442,385,266)
{
link(onItem,16356153:doMT,[])
link(onEndEnum,4517168:doStop,[(424,279)(424,307)(298,307)(298,279)])
link(Array,4383086:Array,[])
}
Add(MST_RowAction,15395190,497,259)
{
MSTControl="MTStrTbl"
}
Add(MT_String,16356153,448,259)
{
link(onResult,15395190:doRowAction,[])
}
Add(Button,7099200,189,266)
{
Left=30
Top=10
link(onClick,4517168:doStart,[])
}
Add(TimeCounter,4517168,308,266)
{
link(onStart,1976442:doEnum,[])
link(onStop,3063237:doCaption,[(347,279)(347,258)(151,258)(151,118)])
}
Add(MTStrTbl,15043066,553,259)
{
Top=35
Width=390
Height=585
Color=15792119
Font=[Century Gothic,10,0,0,204]
KeyPreview=1
Ctl3D=1
WinStyle=1
Name="MTStrTbl"
Columns=#1:1|
FlatScroll=1
ColumnWidth=100
RowSelect=1
TextAlign=2
Style=4
Grid=0
InfoTip=1
EnableOnClick=1
ChangeWidth=1
SmallIconsManager="icons"
DrawManager="draw"
Point(doVisible)
Point(doBringToFront)
}
Add(For,3918577,287,196)
{
End=50000
link(onEvent,4383086:doAdd,[])
}
Add(MainForm,3063237,161,112)
{
Width=407
Height=675
link(onCreate,3918577:doFor,[(277,132)(277,202)])
}
Add(StrList,4383086,371,196)
{
}
Add(ArrayEnum,1976442,385,266)
{
link(onItem,16356153:doMT,[])
link(onEndEnum,4517168:doStop,[(424,279)(424,307)(298,307)(298,279)])
link(Array,4383086:Array,[])
}
Add(MST_RowAction,15395190,497,259)
{
MSTControl="MTStrTbl"
}
Add(MT_String,16356153,448,259)
{
link(onResult,15395190:doRowAction,[])
}
Add(Button,7099200,154,266)
{
Left=30
Top=10
link(onClick,2817889:doStart,[])
}
Add(TimeCounter,4517168,308,266)
{
link(onStart,1976442:doEnum,[])
link(onStop,3063237:doCaption,[(347,279)(347,258)(151,258)(151,118)])
}
Add(MTStrTbl,15043066,553,259)
{
Top=35
Width=390
Height=585
Color=15792119
Font=[Century Gothic,10,0,0,204]
KeyPreview=1
Ctl3D=1
WinStyle=1
Name="MTStrTbl"
Columns=#1:1|
FlatScroll=1
ColumnWidth=100
RowSelect=1
TextAlign=2
Style=4
Grid=0
InfoTip=1
EnableOnClick=1
ChangeWidth=1
SmallIconsManager="icons"
DrawManager="draw"
Point(doVisible)
Point(doBringToFront)
}
Add(For,3918577,287,196)
{
End=50000
link(onEvent,4383086:doAdd,[])
}
Add(Thread,2817889,231,266)
{
Delay=0
FastStop=0
link(onExec,4517168:doStart,[])
}
Add(MainForm,3063237,175,91)
{
Width=407
Height=675
link(onCreate,3918577:doFor,[(291,111)(291,181)])
}
Add(StrList,4383086,385,175)
{
}
Add(ArrayEnum,1976442,399,245)
{
link(onItem,16356153:doMT,[])
link(onEndEnum,10854386:doEvent1,[])
link(Array,4383086:Array,[])
}
Add(MST_RowAction,15395190,637,238)
{
MSTControl="MTStrTbl"
}
Add(MT_String,16356153,588,238)
{
link(onResult,15395190:doRowAction,[])
}
Add(Button,7099200,196,245)
{
Left=30
Top=10
link(onClick,4517168:doStart,[])
}
Add(TimeCounter,4517168,322,245)
{
link(onStart,1976442:doEnum,[])
link(onStop,3063237:doCaption,[(361,258)(361,237)(165,237)(165,97)])
}
Add(Hub,10854386,469,252)
{
link(onEvent1,4517168:doStop,[(494,258)(494,286)(277,286)(277,258)])
link(onEvent2,11957557:doData,[])
}
Add(MTStrTbl,13446720,637,301)
{
Top=35
Width=390
Height=585
Color=15792119
Font=[Century Gothic,10,0,0,204]
WinStyle=1
Columns=#1:1|
ColumnWidth=100
ColorItems=0
RowSelect=1
Style=4
Grid=0
MultiSelect=0
Point(doVisible)
}
Add(Hub,9132122,581,357)
{
link(onEvent1,15043066:doVisible,[])
link(onEvent2,15043066:doBringToFront,[])
}
Add(DoData,11957557,525,259)
{
Data=Integer(1)
link(onEventData,9132122:doEvent1,[(571,265)(571,363)])
}
Add(MTStrTbl,15043066,637,350)
{
Top=35
Width=390
Height=585
Color=15792119
Font=[Century Gothic,10,0,0,204]
Visible=1
KeyPreview=1
Ctl3D=1
WinStyle=1
Name="MTStrTbl"
Columns=#1:1|
FlatScroll=1
ColumnWidth=100
RowSelect=1
TextAlign=2
Style=4
Grid=0
InfoTip=1
EnableOnClick=1
ChangeWidth=1
SmallIconsManager="icons"
DrawManager="draw"
Point(doVisible)
Point(doBringToFront)
}
Add(For,3918577,301,175)
{
End=50000
link(onEvent,4383086:doAdd,[])
}
Add(MainForm,3063237,175,91)
{
Width=407
Height=675
link(onCreate,3918577:doFor,[(291,111)(291,181)])
}
Add(StrList,4383086,385,175)
{
}
Add(ArrayEnum,1976442,399,245)
{
link(onItem,16356153:doMT,[])
link(onEndEnum,10854386:doEvent1,[])
link(Array,4383086:Array,[])
}
Add(MST_RowAction,15395190,637,238)
{
MSTControl="MTStrTbl"
}
Add(MT_String,16356153,588,238)
{
link(onResult,15395190:doRowAction,[])
}
Add(Button,7099200,154,245)
{
Left=30
Top=10
link(onClick,10870963:doStart,[])
}
Add(TimeCounter,4517168,322,245)
{
link(onStart,1976442:doEnum,[])
link(onStop,3063237:doCaption,[(361,258)(361,237)(165,237)(165,97)])
}
Add(Hub,10854386,469,252)
{
link(onEvent1,4517168:doStop,[(494,258)(494,286)(277,286)(277,258)])
link(onEvent2,11957557:doData,[])
}
Add(MTStrTbl,13446720,637,301)
{
Top=35
Width=390
Height=585
Color=15792119
Font=[Century Gothic,10,0,0,204]
WinStyle=1
Columns=#1:1|
ColumnWidth=100
ColorItems=0
RowSelect=1
Style=4
Grid=0
MultiSelect=0
Point(doVisible)
}
Add(Hub,9132122,581,357)
{
link(onEvent1,15043066:doVisible,[])
link(onEvent2,15043066:doBringToFront,[])
}
Add(DoData,11957557,525,259)
{
Data=Integer(1)
link(onEventData,9132122:doEvent1,[(571,265)(571,363)])
}
Add(MTStrTbl,15043066,637,350)
{
Top=35
Width=390
Height=585
Color=15792119
Font=[Century Gothic,10,0,0,204]
Visible=1
KeyPreview=1
Ctl3D=1
WinStyle=1
Name="MTStrTbl"
Columns=#1:1|
FlatScroll=1
ColumnWidth=100
RowSelect=1
TextAlign=2
Style=4
Grid=0
InfoTip=1
EnableOnClick=1
ChangeWidth=1
SmallIconsManager="icons"
DrawManager="draw"
Point(doVisible)
Point(doBringToFront)
}
Add(For,3918577,301,175)
{
End=50000
link(onEvent,4383086:doAdd,[])
}
Add(Thread,10870963,224,245)
{
Delay=0
FastStop=0
link(onExec,4517168:doStart,[])
}
Почему в параллельном потоке увеличивается время в 2 - 3 раза? И есть ли способ быстрой загрузки данных в таблицу?