Closed hecon5 closed 10 months ago
Could you post a build performance report from the log file? I am curious to see how this is working in your environment.
Also, do you see the progress bar slowly incrementing as each table is added? I like the idea of a progress animation on the console, but the UI updates can also negatively impact performance as well. You probably recall the spinning clock in an earlier version before I did away with that in favor of the current progress bar.
On the databases that I have worked with, including some very large ones, I haven't had any one specific thing that was taking a super long time to run between increments.
Sure, last build was 210 seconds, 197 of those were connecting tables.
Here's what happens (note, I'm 99.9% sure it just missed the "Importing tables" screen refresh prior to beginning table import. I'll send a full performance report when it finishes.
Here's the tail end of the Build log. It's quite consistent: (linked) tables take FORRREEEEEVR.
Most (all but 5) are connections to an SQL Server, which is in a geographically different area from me, so that could be it, too, but others that develop with me (who are considerably closer to said server) note that the screen lags out like this for them on table imports, too.
Done. (209.84 seconds)
--------------------------------------------------
PERFORMANCE REPORTS
--------------------------------------------------
Object Type Count Seconds
--------------------------------------------------
Themes 1 0.38
VB Project 1 0.09
VBE References 1 0.04
Shared Images 13 0.21
DB Properties 1 0.05
Tables 102 193.55
Queries 6 0.05
Forms 113 9.48
Macros 1 0.01
Modules 25 0.57
Reports 10 4.20
Table Data 1 0.03
Doc Properties 1 0.01
Nav Pane Groups 1 0.01
--------------------------------------------------
TOTALS: 277 208.68
--------------------------------------------------
--------------------------------------------------
Operations Count Seconds
--------------------------------------------------
Console Updates 6 0.58
Create new database 1 0.34
Clear References 1 0.00
Read File 136 0.07
Parse JSON 126 0.09
Convert to JSON 41 0.03
Compute SHA256 150 0.05
Get Modified Date 162 0.04
Add GUID References 10 0.01
Increment Progress 117 0.82
App.SaveAsText() 1 0.00
Read File Bytes 131 0.05
Delete File 296 0.16
Verify Path 140 0.01
Enc. utf-8 as utf-16 130 0.23
App.LoadFromText() 155 11.33
Get VBA Hash 148 0.07
Enc. utf-8 as windows-1252 25 0.03
Write File 10 0.01
--------------------------------------------------
Other Operations 195.93
--------------------------------------------------
Thanks! That is very helpful. Based on the log, it looks like it takes about 2 seconds for each table... Do you see a progress bar incrementing every two seconds as the tables are imported, or does it just hang for over 3 minutes?
As a side note, it looks like being able to do a merge build instead of a full build will make a HUGE performance difference in your environment!
Just hangs there until it starts working. Some of my other devs have repeatedly closed and reopened Access/complained to me that it's "broken" because they're impatient...
How long does it take for the first table to link? After the first table links, does it update the progress bar every two seconds or so as the others are added?
Stays stuck and hangs; it's impossible to tell how long each table takes :/
Well, here's an interesting thing: when I Check Show Detailed Output
it does not hang, and does update the screen.
It takes 1 second longer (210 vice 209) when I do this (consistently).
By my extra precise stopwatch clicking, it's ~2 seconds/table, and does not appear to vary at all from table to table.
Yes, the detailed output will trigger a Flush
which includes a call to DoEvents
periodically, which is where you are getting the screen updates. My hunch is that we may be able to make a slight tweak to get better updates on the progress bar, but it is a little hard to test on my end...
You could try adding a Debug.Print Now()
statement near the end of in clsLog.Increment
to verify that it is actually updating the progress bar every few seconds.
I'll attempt to remember to plop that in next rebuild here.
To avoid performance issues and UI locking; the animation could be displayed on a separate thread. The only way to pull that off in VBA is to make a call to something external. This is where having the GUI of the VCS system written in another language would be beneficial. Short of that, we could just pop a status window that shows an animation and waits for a finished signal from the VCS. Maybe something that compiles down to a simple binary using TwinBASIC? In that vein, if we make a Ribbon Add-In using TwinBASIC it can also host GUI components. This will allow us to have a responsive GUI that is not dependent upon Access, allowing the VBA code to do it's thing unencumbered.
I think this is actually covered now, I noticed that when building linked tables (the slow step above), it no longer hangs...it could be my machine, but I think this can be closed now.
On some long operations (namely, linking tables), the interface appears to hang while building.
As an option, can we add a looped "animation" (progressing ellipsis, as an example), to show that the interface isn't hung, it's just taking its sweeeeeet time.
This could be tied to the timer, so we'd need to determine if an export/build is happening so that the timer doesn't close the form and create surprised and angry screaming...