AHilberink Well-Known Member Licensed User Longtime User Dec 20, 2022 #1 Hi, I am having trouble by speeding up the loading of my CLV. Attached I have made a small example of my project. Just 35 lines to load, but because of the table inside the lines it is very slow. I hope someone will have a look and may be have some advise to improve the loading speed. Kind regards, André Attachments ExampleCLV.zip ExampleCLV.zip 47.7 KB · Views: 535
Hi, I am having trouble by speeding up the loading of my CLV. Attached I have made a small example of my project. Just 35 lines to load, but because of the table inside the lines it is very slow. I hope someone will have a look and may be have some advise to improve the loading speed. Kind regards, André
E emexes Expert Licensed User Longtime User Dec 20, 2022 #2 AHilberink said: Attached I have made a small example of my project. Just 35 lines to load, but because of the table inside the lines it is very slow. Click to expand... Creating the maps should be no problem, but the bit where you write (insert) the maps into a database, that's probably where it's getting bogged down. I couldn't see a .db file so I didn't actually try running your example, but given you've put the effort into creating the example... give me a few minutes... ? ps when you say "table inside the lines"... what lines? Upvote 0
AHilberink said: Attached I have made a small example of my project. Just 35 lines to load, but because of the table inside the lines it is very slow. Click to expand... Creating the maps should be no problem, but the bit where you write (insert) the maps into a database, that's probably where it's getting bogged down. I couldn't see a .db file so I didn't actually try running your example, but given you've put the effort into creating the example... give me a few minutes... ? ps when you say "table inside the lines"... what lines?
AHilberink Well-Known Member Licensed User Longtime User Dec 20, 2022 #3 emexes said: Creating the maps should be no problem, but the bit where you write (insert) the maps into a database, that's probably where it's getting bogged down. I couldn't see a .db file so I didn't actually try running your example, but given you've put the effort into creating the example... give me a few minutes... ? ps when you say "table inside the lines"... what lines? Click to expand... Hi Emexes, The part of creating the DB within the Main is just to fill the example. If you hit the Button, you will open the part with the CLV (Module Opdrachten) which is slow. Thanks for helping me. Kind regards, André Upvote 0
emexes said: Creating the maps should be no problem, but the bit where you write (insert) the maps into a database, that's probably where it's getting bogged down. I couldn't see a .db file so I didn't actually try running your example, but given you've put the effort into creating the example... give me a few minutes... ? ps when you say "table inside the lines"... what lines? Click to expand... Hi Emexes, The part of creating the DB within the Main is just to fill the example. If you hit the Button, you will open the part with the CLV (Module Opdrachten) which is slow. Thanks for helping me. Kind regards, André
E emexes Expert Licensed User Longtime User Dec 20, 2022 #4 AHilberink said: Thanks for helping me. Click to expand... Lol thanks but let's not count our chickens just yet ? I'm currently trawling through B4XGoodies trying to locate libraries that you have and I don't (yet). Upvote 0
AHilberink said: Thanks for helping me. Click to expand... Lol thanks but let's not count our chickens just yet ? I'm currently trawling through B4XGoodies trying to locate libraries that you have and I don't (yet).
E emexes Expert Licensed User Longtime User Dec 21, 2022 #5 Sorry, got distracted, still working on it, just got past tripping up over that missing aar file. Upvote 0
E emexes Expert Licensed User Longtime User Dec 21, 2022 #6 Progress report: close, but no cigar (yet) Code: Copy Logger connected to: TCL 5009A --------- beginning of main ** Activity (main) Resume ** ** Activity (main) Pause, UserClosed = false ** ** Activity (opdrachten) Create, isFirst = true ** Table: 0 Error occurred on line: 177 (Opdrachten) java.lang.RuntimeException: Class instance was not initialized (table) at anywheresoftware.b4a.debug.Debug.shouldDelegate(Debug.java:242) at b4a.example.table._getrowheight(table.java:132) at b4a.example.opdrachten._createitem(opdrachten.java:456) at b4a.example.opdrachten._activity_create(opdrachten.java:414) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:146) at b4a.example.opdrachten.afterFirstLayout(opdrachten.java:105) at b4a.example.opdrachten.access$000(opdrachten.java:17) at b4a.example.opdrachten$WaitForLayout.run(opdrachten.java:83) at android.os.Handler.handleCallback(Handler.java:836) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:203) at android.app.ActivityThread.main(ActivityThread.java:6251) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924) ** Activity (opdrachten) Resume ** I have some cheese and tomato sandwiches under the griller = I'll be back in half an hour ? Last edited: Dec 21, 2022 Upvote 0
Progress report: close, but no cigar (yet) Code: Copy Logger connected to: TCL 5009A --------- beginning of main ** Activity (main) Resume ** ** Activity (main) Pause, UserClosed = false ** ** Activity (opdrachten) Create, isFirst = true ** Table: 0 Error occurred on line: 177 (Opdrachten) java.lang.RuntimeException: Class instance was not initialized (table) at anywheresoftware.b4a.debug.Debug.shouldDelegate(Debug.java:242) at b4a.example.table._getrowheight(table.java:132) at b4a.example.opdrachten._createitem(opdrachten.java:456) at b4a.example.opdrachten._activity_create(opdrachten.java:414) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:146) at b4a.example.opdrachten.afterFirstLayout(opdrachten.java:105) at b4a.example.opdrachten.access$000(opdrachten.java:17) at b4a.example.opdrachten$WaitForLayout.run(opdrachten.java:83) at android.os.Handler.handleCallback(Handler.java:836) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:203) at android.app.ActivityThread.main(ActivityThread.java:6251) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924) ** Activity (opdrachten) Resume ** I have some cheese and tomato sandwiches under the griller = I'll be back in half an hour ?
E emexes Expert Licensed User Longtime User Dec 21, 2022 #7 Righto, I've gotten as far as tblAanvulling1 not being initialized. I can see it in layout file item.bal I moved p.LoadLayout("item") up to before the tblAanvulling1 properties were used, but now getting error: Code: Copy Logger connected to: TCL 5009A --------- beginning of system --------- beginning of main *** Service (starter) Create *** ** Service (starter) Start ** ** Activity (main) Create, isFirst = true ** ** Activity (main) Resume ** ** Activity (main) Pause, UserClosed = false ** ** Activity (opdrachten) Create, isFirst = true ** Panel size is unknown. Layout may not be loaded correctly. Error occurred on line: 173 (Opdrachten) java.lang.RuntimeException: java.lang.RuntimeException: Cannot convert: class anywheresoftware.b4a.objects.ImageViewWrapper, to: class anywheresoftware.b4a.objects.ButtonWrapper at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:155) at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134) at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:314) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:146) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197) at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262) at b4a.example.opdrachten._createitem(opdrachten.java:438) at b4a.example.opdrachten._activity_create(opdrachten.java:414) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:146) at b4a.example.opdrachten.afterFirstLayout(opdrachten.java:105) at b4a.example.opdrachten.access$000(opdrachten.java:17) at b4a.example.opdrachten$WaitForLayout.run(opdrachten.java:83) at android.os.Handler.handleCallback(Handler.java:836) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:203) at android.app.ActivityThread.main(ActivityThread.java:6251) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924) Caused by: java.lang.RuntimeException: Cannot convert: class anywheresoftware.b4a.objects.ImageViewWrapper, to: class anywheresoftware.b4a.objects.ButtonWrapper at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:398) at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:442) at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:442) at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:133) ... 28 more If you could restore your example project zip to a new empty folder name (ie not over the top of your existing example project) and confirm that it still works, that'd be great. Upvote 0
Righto, I've gotten as far as tblAanvulling1 not being initialized. I can see it in layout file item.bal I moved p.LoadLayout("item") up to before the tblAanvulling1 properties were used, but now getting error: Code: Copy Logger connected to: TCL 5009A --------- beginning of system --------- beginning of main *** Service (starter) Create *** ** Service (starter) Start ** ** Activity (main) Create, isFirst = true ** ** Activity (main) Resume ** ** Activity (main) Pause, UserClosed = false ** ** Activity (opdrachten) Create, isFirst = true ** Panel size is unknown. Layout may not be loaded correctly. Error occurred on line: 173 (Opdrachten) java.lang.RuntimeException: java.lang.RuntimeException: Cannot convert: class anywheresoftware.b4a.objects.ImageViewWrapper, to: class anywheresoftware.b4a.objects.ButtonWrapper at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:155) at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134) at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:314) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:146) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197) at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262) at b4a.example.opdrachten._createitem(opdrachten.java:438) at b4a.example.opdrachten._activity_create(opdrachten.java:414) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:146) at b4a.example.opdrachten.afterFirstLayout(opdrachten.java:105) at b4a.example.opdrachten.access$000(opdrachten.java:17) at b4a.example.opdrachten$WaitForLayout.run(opdrachten.java:83) at android.os.Handler.handleCallback(Handler.java:836) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:203) at android.app.ActivityThread.main(ActivityThread.java:6251) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924) Caused by: java.lang.RuntimeException: Cannot convert: class anywheresoftware.b4a.objects.ImageViewWrapper, to: class anywheresoftware.b4a.objects.ButtonWrapper at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:398) at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:442) at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:442) at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:133) ... 28 more If you could restore your example project zip to a new empty folder name (ie not over the top of your existing example project) and confirm that it still works, that'd be great.
P PaulMeuris Well-Known Member Licensed User Dec 21, 2022 #8 If this code is not executed the app starts fast. B4X: Copy If(VanafStart=False) Then Dim p As B4XView = CreateItem(0,0,"","","","","","","") OpdrachtTable.Add(p, expandable.CreateValue(p, "some value")) DatumLong=DateTime.Now DisplayDatum=DateTime.Date(DateTime.Now) WisselDatum End If The CreateItem subroutine throws an error. B4X: Copy Sub CreateItem(Opdracht As Int, Ingetrokken As Int, Eindeuitvoering As String, Klantnaam As String, Adres As String, Tijd As String, Omschrijving As String, Reeds As String, Toelichting As String) As B4XView Dim p As B4XView = xui.CreatePanel("") Log("Table: "&Opdracht) 'EigenFuncties.Aanvulling(Bericht) Dim Rows As Int=Main.SQL1.ExecQuerySingleResult("SELECT COUNT(*) FROM Dumptabel WHERE OpdrachtID="&Opdracht) The variable Opdracht is an ID field of the Dumptabel (and not a table as the log suggests). When is the Dumptabel filled? Upvote 0
If this code is not executed the app starts fast. B4X: Copy If(VanafStart=False) Then Dim p As B4XView = CreateItem(0,0,"","","","","","","") OpdrachtTable.Add(p, expandable.CreateValue(p, "some value")) DatumLong=DateTime.Now DisplayDatum=DateTime.Date(DateTime.Now) WisselDatum End If The CreateItem subroutine throws an error. B4X: Copy Sub CreateItem(Opdracht As Int, Ingetrokken As Int, Eindeuitvoering As String, Klantnaam As String, Adres As String, Tijd As String, Omschrijving As String, Reeds As String, Toelichting As String) As B4XView Dim p As B4XView = xui.CreatePanel("") Log("Table: "&Opdracht) 'EigenFuncties.Aanvulling(Bericht) Dim Rows As Int=Main.SQL1.ExecQuerySingleResult("SELECT COUNT(*) FROM Dumptabel WHERE OpdrachtID="&Opdracht) The variable Opdracht is an ID field of the Dumptabel (and not a table as the log suggests). When is the Dumptabel filled?
klaus Expert Licensed User Longtime User Dec 21, 2022 #9 Unfortunately, your project does not work as it is. I got the same error as emexes. I had to modify in the CreateItem routine the height values to fixed values. Then i got another error, because in your layout you have an ImageView, but in the code you declared it as a Button !? Then the program runs. I checked the different parts of the program in Release mode. For the tests i removed all Sleep(0) and commented the call to the ProgressBar. To load the program it takes: 8.7 seconds Then i commented the filling of the Tables and it takes: 3 s. Then i uncommented the filling of the Tables but left tblAanvulling1.ClearAll commented (not needed), it takes: 6.1 s. Therefore filling the Tables takes about the same time as filling the CLV. I will investigate further to see if the filling of the Tables can be optimized. A few questions: - Are the column widths of all tables the same ? - What is row number of the longest table ? - Will there be Tables needing horizontal scrolling ? Depending on the answers, the code for the Tables could be simplified. Creating very simple tables instead of using the Table CustomView. Last edited: Dec 23, 2022 Upvote 0
Unfortunately, your project does not work as it is. I got the same error as emexes. I had to modify in the CreateItem routine the height values to fixed values. Then i got another error, because in your layout you have an ImageView, but in the code you declared it as a Button !? Then the program runs. I checked the different parts of the program in Release mode. For the tests i removed all Sleep(0) and commented the call to the ProgressBar. To load the program it takes: 8.7 seconds Then i commented the filling of the Tables and it takes: 3 s. Then i uncommented the filling of the Tables but left tblAanvulling1.ClearAll commented (not needed), it takes: 6.1 s. Therefore filling the Tables takes about the same time as filling the CLV. I will investigate further to see if the filling of the Tables can be optimized. A few questions: - Are the column widths of all tables the same ? - What is row number of the longest table ? - Will there be Tables needing horizontal scrolling ? Depending on the answers, the code for the Tables could be simplified. Creating very simple tables instead of using the Table CustomView.
AHilberink Well-Known Member Licensed User Longtime User Dec 22, 2022 #10 klaus said: Unfortunately, your project does not work as it is. I got the same error as emexes. I had to modify in the CreateItem routine the height values to fixed values. Then i got another error, because in your layout you have an ImageView, but in the code you declared it as a Button !? Then the program runs. I checked the different parts of the program in Release mode. For the tests i removed all Sleep(0) and commented the call to the ProgressBar. Tu load the program it takes: 8.7 seconds Then i commented the filling of the Tables and it takes: 3 s. Then i uncommented the filling of the Tables but left tblAanvulling1.ClearAll commented (not needed), it takes: 6.1 s. Therefore filling the Tables takes about the same time as filling the CLV. I will investigate further to see if the filling of the Tables can be optimized. A few questions: - Are the column widths of all tables the same ? - What is row number of the longest table ? - Will there be Tables needing horizontal scrolling ? Depending on the answers, the code for the Tables could be simplified. Creating very simple tables instead of using the Table CustomView. Click to expand... Hi, Thanks you all for helping me. I don't understand why the example is not working (tried it on 2 different devices and even download the zip and tried the project from a new map). But you got it working. The answer to your questions are: I will investigate further to see if the filling of the Tables can be optimized. A few questions: - Are the column widths of all tables the same ? Yes, they are al the same - What is row number of the longest table ? It depends on the order, but I think the maximum will be about 4 - Will there be Tables needing horizontal scrolling ? No, with the maximum of 4 it will be not needed I hope you can help me to speed it up. Kind regards, André Upvote 0
klaus said: Unfortunately, your project does not work as it is. I got the same error as emexes. I had to modify in the CreateItem routine the height values to fixed values. Then i got another error, because in your layout you have an ImageView, but in the code you declared it as a Button !? Then the program runs. I checked the different parts of the program in Release mode. For the tests i removed all Sleep(0) and commented the call to the ProgressBar. Tu load the program it takes: 8.7 seconds Then i commented the filling of the Tables and it takes: 3 s. Then i uncommented the filling of the Tables but left tblAanvulling1.ClearAll commented (not needed), it takes: 6.1 s. Therefore filling the Tables takes about the same time as filling the CLV. I will investigate further to see if the filling of the Tables can be optimized. A few questions: - Are the column widths of all tables the same ? - What is row number of the longest table ? - Will there be Tables needing horizontal scrolling ? Depending on the answers, the code for the Tables could be simplified. Creating very simple tables instead of using the Table CustomView. Click to expand... Hi, Thanks you all for helping me. I don't understand why the example is not working (tried it on 2 different devices and even download the zip and tried the project from a new map). But you got it working. The answer to your questions are: I will investigate further to see if the filling of the Tables can be optimized. A few questions: - Are the column widths of all tables the same ? Yes, they are al the same - What is row number of the longest table ? It depends on the order, but I think the maximum will be about 4 - Will there be Tables needing horizontal scrolling ? No, with the maximum of 4 it will be not needed I hope you can help me to speed it up. Kind regards, André
AHilberink Well-Known Member Licensed User Longtime User Dec 22, 2022 #11 PaulMeuris said: If this code is not executed the app starts fast. B4X: Copy If(VanafStart=False) Then Dim p As B4XView = CreateItem(0,0,"","","","","","","") OpdrachtTable.Add(p, expandable.CreateValue(p, "some value")) DatumLong=DateTime.Now DisplayDatum=DateTime.Date(DateTime.Now) WisselDatum End If The CreateItem subroutine throws an error. B4X: Copy Sub CreateItem(Opdracht As Int, Ingetrokken As Int, Eindeuitvoering As String, Klantnaam As String, Adres As String, Tijd As String, Omschrijving As String, Reeds As String, Toelichting As String) As B4XView Dim p As B4XView = xui.CreatePanel("") Log("Table: "&Opdracht) 'EigenFuncties.Aanvulling(Bericht) Dim Rows As Int=Main.SQL1.ExecQuerySingleResult("SELECT COUNT(*) FROM Dumptabel WHERE OpdrachtID="&Opdracht) The variable Opdracht is an ID field of the Dumptabel (and not a table as the log suggests). When is the Dumptabel filled? Click to expand... Hi, Thanks for the help and your reply. If this code is not executed the app starts fast. This part is neccesary to start the filling of today and I cannot disable it. The variable Opdracht is an ID field of the Dumptabel (and not a table as the log suggests). This is correct, sorry for the Log("Table: "....), but this was made during testing by me When is the Dumptabel filled? This filling is done at lin 110: EigenFuncties.Aanvulling(res.GetInt("OpdrachtID")) of module Opdrachten I will investigate why you all got errors by running my example. Maybe a difference between my 11.8 and v12? Kind regards, André Upvote 0
PaulMeuris said: If this code is not executed the app starts fast. B4X: Copy If(VanafStart=False) Then Dim p As B4XView = CreateItem(0,0,"","","","","","","") OpdrachtTable.Add(p, expandable.CreateValue(p, "some value")) DatumLong=DateTime.Now DisplayDatum=DateTime.Date(DateTime.Now) WisselDatum End If The CreateItem subroutine throws an error. B4X: Copy Sub CreateItem(Opdracht As Int, Ingetrokken As Int, Eindeuitvoering As String, Klantnaam As String, Adres As String, Tijd As String, Omschrijving As String, Reeds As String, Toelichting As String) As B4XView Dim p As B4XView = xui.CreatePanel("") Log("Table: "&Opdracht) 'EigenFuncties.Aanvulling(Bericht) Dim Rows As Int=Main.SQL1.ExecQuerySingleResult("SELECT COUNT(*) FROM Dumptabel WHERE OpdrachtID="&Opdracht) The variable Opdracht is an ID field of the Dumptabel (and not a table as the log suggests). When is the Dumptabel filled? Click to expand... Hi, Thanks for the help and your reply. If this code is not executed the app starts fast. This part is neccesary to start the filling of today and I cannot disable it. The variable Opdracht is an ID field of the Dumptabel (and not a table as the log suggests). This is correct, sorry for the Log("Table: "....), but this was made during testing by me When is the Dumptabel filled? This filling is done at lin 110: EigenFuncties.Aanvulling(res.GetInt("OpdrachtID")) of module Opdrachten I will investigate why you all got errors by running my example. Maybe a difference between my 11.8 and v12? Kind regards, André
klaus Expert Licensed User Longtime User Dec 22, 2022 #12 One more question: - Do you need to select any row ? - Do you need any header or cell click event ? Last edited: Dec 22, 2022 Upvote 0
AHilberink Well-Known Member Licensed User Longtime User Dec 22, 2022 #13 klaus said: One more question: - Do you need to select any row ? - Do you need any header or cell click event ? Click to expand... Hi Klaus, - Do you need to select any row ? I don't need to select any row - Do you need any header or cell click event ? I don't need click on a header or cell. I would be nice to have a click event on the whole table Kind regards, André Upvote 0
klaus said: One more question: - Do you need to select any row ? - Do you need any header or cell click event ? Click to expand... Hi Klaus, - Do you need to select any row ? I don't need to select any row - Do you need any header or cell click event ? I don't need click on a header or cell. I would be nice to have a click event on the whole table Kind regards, André
E emexes Expert Licensed User Longtime User Dec 22, 2022 #14 Well, I tried using plain old SQL library in place of SQLCipher library, but that made no noticeable speed difference. I am feeling like the speedup would be to grab all the data from the database in one gulp, and then distribute from the temporary copy in memory, to all of those tables on the clv. B4X: Copy 'takes ~150 ms (x 36) Dim tempquery As String = "SELECT Actie, Omschrijving, Aantal FROM DumpTabel WHERE OpdrachtID=" & Opdracht 'takes ~200 ms (x 1) Dim tempquery As String = "SELECT Actie, Omschrijving, Aantal, OpdrachtID FROM DumpTabel" Last edited: Dec 22, 2022 Upvote 0
Well, I tried using plain old SQL library in place of SQLCipher library, but that made no noticeable speed difference. I am feeling like the speedup would be to grab all the data from the database in one gulp, and then distribute from the temporary copy in memory, to all of those tables on the clv. B4X: Copy 'takes ~150 ms (x 36) Dim tempquery As String = "SELECT Actie, Omschrijving, Aantal FROM DumpTabel WHERE OpdrachtID=" & Opdracht 'takes ~200 ms (x 1) Dim tempquery As String = "SELECT Actie, Omschrijving, Aantal, OpdrachtID FROM DumpTabel"
E emexes Expert Licensed User Longtime User Dec 22, 2022 #15 In the real-life app, it'll be a shared remote database, right? ie not just using local temporary database to build clv Upvote 0
In the real-life app, it'll be a shared remote database, right? ie not just using local temporary database to build clv
AHilberink Well-Known Member Licensed User Longtime User Dec 22, 2022 #16 emexes said: In the real-life app, it'll be a shared remote database, right? ie not just using local temporary database to build clv Click to expand... In the real-life app it is exactly the same. There is no remote database. Upvote 0
emexes said: In the real-life app, it'll be a shared remote database, right? ie not just using local temporary database to build clv Click to expand... In the real-life app it is exactly the same. There is no remote database.
klaus Expert Licensed User Longtime User Dec 22, 2022 #17 Leave me some time till tomorrow. The current version fills the CLV in about 0.3 s. I am about to go to do some indoor climbing. Upvote 0
Leave me some time till tomorrow. The current version fills the CLV in about 0.3 s. I am about to go to do some indoor climbing.
E emexes Expert Licensed User Longtime User Dec 22, 2022 #18 AHilberink said: In the real-life app it is exactly the same. There is no remote database. Click to expand... Then perhaps the belt-and-braces generality of SQLite is over-engineering the process (sledgehammer to crack a walnut). An Array/List/Map of user-defined-type might be simpler. Saved to CSV file occasionally, just in case battery goes flat etc (bonus - can load CSV into spreadsheet or upload to Google Sheet for easy(ish) viewing and debugging). Upvote 0
AHilberink said: In the real-life app it is exactly the same. There is no remote database. Click to expand... Then perhaps the belt-and-braces generality of SQLite is over-engineering the process (sledgehammer to crack a walnut). An Array/List/Map of user-defined-type might be simpler. Saved to CSV file occasionally, just in case battery goes flat etc (bonus - can load CSV into spreadsheet or upload to Google Sheet for easy(ish) viewing and debugging).
E emexes Expert Licensed User Longtime User Dec 22, 2022 #19 klaus said: The current version fills the CLV in about 0.3 s. Click to expand... As in: your hotted-up / fine-tuned current version? Did it involve reading the entire database in one gulp? Upvote 0
klaus said: The current version fills the CLV in about 0.3 s. Click to expand... As in: your hotted-up / fine-tuned current version? Did it involve reading the entire database in one gulp?
klaus Expert Licensed User Longtime User Dec 22, 2022 #20 Currently, i change the Table class. The loading of the database is the same. Upvote 0