My application starts the basex server (and only stops the server when the application closes) and attempts to open the database that it expects to find. If it doesn't find it, it will create it with the source XML files. When a user wants to update the database, it simply drops it and recreates it from the XML files.actually executing the exact same code. I see that the database creation time for those two tasks is quite different. The first one takes quite a bit longer.
If, when the application starts, it DOES find the database, it opens it. If the user then clicks "update" it does the drop/recreate process. If it does it again, it does the drop/recreate process. It seems that in these cases, the first one also takes noticeably longer. Subsequent updates are faster.
My conclusion is that the first CREATE DB after starting the server takes longer than all the subsequent ones before the server is stopped. Is this a "memory acquisition" issue? I.e. the server starts with a small memory footprint by default and then simply asks (frequently) for more when it needs it? If so, can it be started with a larger amount initially or tell it to grab it in larger quantities in order to reduce the time for the initial database creation? If that has nothing to do with it, any other ideas?
Here is my basex log illustrating these two examples:
18:19:15.419 Server was started.
18:19:15.905 [127.0.0.1:60244] LOGIN admin OK
18:19:16.032 [127.0.0.1:60244] OPEN OpenSongSearch Error: Database 'OpenSongSearch' was not found. 32.63 ms
18:19:16.049 [127.0.0.1:60244] LOGOUT admin OK
18:19:16.469 [127.0.0.1:60245] LOGIN admin OK
18:19:16.493 [127.0.0.1:60245] DROP DB OpenSongSearch OK 0.77 ms
18:19:16.493 [127.0.0.1:60245] SET CREATEFILTER * OK 0.66 ms
18:19:16.494 [127.0.0.1:60245] SET ENTITY true OK 0.42 ms
18:19:16.494 [127.0.0.1:60245] SET FTINDEX true OK 0.36 ms
18:19:16.495 [127.0.0.1:60245] SET INTPARSE true OK 0.36 ms
18:19:16.495 [127.0.0.1:60245] SET PARSER xml OK 0.32 ms
18:19:16.496 [127.0.0.1:60245] SET WILDCARDS true OK 0.34 ms
18:20:31.458 [127.0.0.1:60245] CREATE DB OpenSongSearch C:\Users\David\DOCUME~1\OpenSong\Songs OK 74961.71 ms
18:20:31.460 [127.0.0.1:60245] LOGOUT admin OK
18:20:33.146 [127.0.0.1:60262] LOGIN admin OK
18:20:33.175 [127.0.0.1:60262] OPEN OpenSongSearch OK 9.2 ms
18:20:33.177 [127.0.0.1:60262] INFO DB OK 1.66 ms
18:20:33.177 [127.0.0.1:60262] CLOSE OK 0.38 ms
18:20:33.178 [127.0.0.1:60262] LOGOUT admin OK
18:21:10.314 [127.0.0.1:60270] LOGIN admin OK
18:21:10.340 [127.0.0.1:60270] DROP DB OpenSongSearch OK 7.85 ms
18:21:10.340 [127.0.0.1:60270] SET CREATEFILTER * OK 0.25 ms
18:21:10.341 [127.0.0.1:60270] SET ENTITY true OK 0.29 ms
18:21:10.341 [127.0.0.1:60270] SET FTINDEX true OK 0.23 ms
18:21:10.341 [127.0.0.1:60270] SET INTPARSE true OK 0.23 ms
18:21:10.342 [127.0.0.1:60270] SET PARSER xml OK 0.25 ms
18:21:10.342 [127.0.0.1:60270] SET WILDCARDS true OK 0.25 ms
18:21:17.190 [127.0.0.1:60270] CREATE DB OpenSongSearch C:\Users\David\DOCUME~1\OpenSong\Songs OK 6848.68 ms
18:21:17.195 [127.0.0.1:60270] LOGOUT admin OK
18:21:18.140 [127.0.0.1:60272] LOGIN admin OK
18:21:18.167 [127.0.0.1:60272] OPEN OpenSongSearch OK 9.26 ms
18:21:18.168 [127.0.0.1:60272] INFO DB OK 1.05 ms
18:21:18.169 [127.0.0.1:60272] CLOSE OK 0.36 ms
18:21:18.169 [127.0.0.1:60272] LOGOUT admin OK
18:21:20.636 Server was stopped.
19:11:23.757 Server was started.
19:11:24.319 [127.0.0.1:61004] LOGIN admin OK
19:11:24.899 [127.0.0.1:61004] OPEN OpenSongSearch OK 517.02 ms
19:11:24.903 [127.0.0.1:61004] INFO DB OK 3.75 ms
19:11:24.905 [127.0.0.1:61004] CLOSE OK 2.23 ms
19:11:24.906 [127.0.0.1:61004] LOGOUT admin OK
19:11:25.358 [127.0.0.1:61005] LOGIN admin OK
19:11:25.724 [127.0.0.1:61005] OPEN OpenSongSearch OK 348.05 ms
19:11:25.727 [127.0.0.1:61005] INFO DB OK 2.81 ms
19:11:25.728 [127.0.0.1:61005] CLOSE OK 0.88 ms
19:11:25.729 [127.0.0.1:61005] LOGOUT admin OK
19:11:49.961 [127.0.0.1:61013] LOGIN admin OK
19:11:49.985 [127.0.0.1:61013] DROP DB OpenSongSearch OK 6.82 ms
19:11:49.986 [127.0.0.1:61013] SET CREATEFILTER * OK 0.67 ms
19:11:49.986 [127.0.0.1:61013] SET ENTITY true OK 0.32 ms
19:11:49.987 [127.0.0.1:61013] SET FTINDEX true OK 0.37 ms
19:11:49.987 [127.0.0.1:61013] SET INTPARSE true OK 0.34 ms
19:11:49.988 [127.0.0.1:61013] SET PARSER xml OK 0.4 ms
19:11:49.988 [127.0.0.1:61013] SET WILDCARDS true OK 0.34 ms
19:12:09.591 [127.0.0.1:61013] CREATE DB OpenSongSearch C:\Users\David\DOCUME~1\OpenSong\Songs OK 19602.28 ms
19:12:09.592 [127.0.0.1:61013] LOGOUT admin OK
19:12:10.547 [127.0.0.1:61018] LOGIN admin OK
19:12:10.598 [127.0.0.1:61018] OPEN OpenSongSearch OK 8.42 ms
19:12:10.599 [127.0.0.1:61018] INFO DB OK 0.96 ms
19:12:10.600 [127.0.0.1:61018] CLOSE OK 0.39 ms
19:12:10.601 [127.0.0.1:61018] LOGOUT admin OK
19:12:20.716 [127.0.0.1:61021] LOGIN admin OK
19:12:20.742 [127.0.0.1:61021] DROP DB OpenSongSearch OK 8.13 ms
19:12:20.742 [127.0.0.1:61021] SET CREATEFILTER * OK 0.27 ms
19:12:20.743 [127.0.0.1:61021] SET ENTITY true OK 0.26 ms
19:12:20.743 [127.0.0.1:61021] SET FTINDEX true OK 0.25 ms
19:12:20.744 [127.0.0.1:61021] SET INTPARSE true OK 0.27 ms
19:12:20.744 [127.0.0.1:61021] SET PARSER xml OK 0.25 ms
19:12:20.745 [127.0.0.1:61021] SET WILDCARDS true OK 0.26 ms
19:12:26.555 [127.0.0.1:61021] CREATE DB OpenSongSearch C:\Users\David\DOCUME~1\OpenSong\Songs OK 5811.0 ms
19:12:26.557 [127.0.0.1:61021] LOGOUT admin OK
19:12:27.677 [127.0.0.1:61024] LOGIN admin OK
19:12:27.705 [127.0.0.1:61024] OPEN OpenSongSearch OK 7.94 ms
19:12:27.706 [127.0.0.1:61024] INFO DB OK 0.99 ms
19:12:27.707 [127.0.0.1:61024] CLOSE OK 0.37 ms
19:12:27.707 [127.0.0.1:61024] LOGOUT admin OK
19:12:29.820 Server was stopped.
Thanks!