-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: last package selected displays its details even if there are no search results. #17
Labels
bug
Something isn't working
Milestone
Comments
This probably won't be fixed until there's a way to see how many packages are visible, so it may take longer. |
Maybe an option to clear selections on search and reset the description textbox's text would be useful. |
DrewNaylor
added a commit
that referenced
this issue
Jan 24, 2022
results, as it doesn't make sense to show the previously-selected package's details when there are no packages available. Been wanting to fix this for a while, and the new DataView and DataTable setup allow this to work. Fixes #17. This is one of the oldest still-opened issues.
3 tasks
DrewNaylor
added a commit
that referenced
this issue
Jan 24, 2022
…-class Significantly-faster package list loading and nearly-instant search, both provided by a DataView and its RowFilter. Thought this was going to be using VirtualMode and a Package class, but so far these changes are major improvements, so I might not do those unless necessary. Current known bugs and issues: - [x] The database isn't being closed after updating the cache, so it says that it's in use when I try to update again. (This should be fixed now, I hope. Mainly what I did was to have it clear the pools just before returning the datatable so that hopefully it's not in memory now.) - [x] There aren't dropdowns/comboboxes in the `Actions` column right now, as I don't entirely know how to put them into DataTables. This is super important to ensure people can use it anyway they want. Edit: maybe I can just have it so that people can press `spacebar` when the `Action` column is the current column and open a makeshift menu for the `Action` items that's used instead of the previous dropdown. Edit 2: I just added the `Ctrl+M` keyboard shortcut so people can open the context menu in the top-left corner of the package list DataGridView, which is a lot less work and should be better than what it was before. People can still use `Alt+S` if they wish to open the `Selected packages` menu, which has the `Ctrl+M` button in it. Only potential issue is this'll cover up some of the packages, but for now, I don't have any other simple solutions that aren't more buggy than the previous dropdowns. - [x] `Actions` and `Status` columns aren't auto-sized correctly. - Not really an issue, but there may be a lot of useless code that was necessary previously that doesn't present any noticeable problems that'll have to be removed. - TODO: I need to have a column for `Installed version` once there's a way to allow users to choose a different version to install rather than the latest version. This'll just be something I'll add in the future, rather than in this PR. Additions: - New setting: `DebuggingShowManifestPathColumn`, Boolean, defaults to `False`. You can use this to show the ManifestPath column, as expected. - Since there's a way to know how many rows are currently being shown vs how many are loaded in total, the statusbar now displays the number of listed packages alongside the total number of loaded packages. This is sorta like what Synaptic does, except the number of packages marked in various ways isn't shown yet. Once I can get that working, I'll add that feature. - Column widths are now saved across refreshing the cache, which is effectively the same thing that happened last time, except this is necessary as we're removing everything from the datagridview on cache updates. Fixes: - Selecting all packages with Ctrl+A while searching will select every package, even the ones that aren't visible. (fixes #13) - Last package selected displays its details even if there are no search results. (fixes #17, though I did push a commit earlier with the "fixes" thing) Removals: - Forgot about the ManifestType column, but I didn't add support for it in the new code. Copied over the commented-out code so it can be used if necessary, though it'll require changes. - We're not using the `PackageInfo` class or whatever it's called sometimes anymore, so I removed it completely and it's not just commented out now. Other changes: - Descriptions and manifest paths are loaded at the same time as the rest of the details are loaded from the database to make using the DataTable easier/possible. I decided to make the code that adds the rows to the datatable use Await Task.Run to try to speed it up, and it may help a little, but I'm not sure how much. - Libraries were updated. - Just so I don't miss this when writing the changelog, searches are now near-instant, and loading the package list is usually way faster, even on my desktop which is a Ryzen 5800X. I think it also uses a lot less RAM now too, usually staying under 80 MB of RAM, whereas before it would easily go into 120 MB or more. At least, that was based on the highest number in the memory usage graph in Visual Studio, so it's not exact. Sometimes it can use a lot more, too, so I need to figure out how to keep the memory usage lower. Running without the debugger makes package list loading faster, though rarely it's still really slow for some reason. - Instead of having the progressbar go up by 1 for each package, it now goes up every 100 packages when there are 100 or more in the list, goes up by 10 if there are 10 or more but fewer than 99 packages, and up by 1 if there are fewer than 10 packages. This may help improve performance by not constantly updating the UI thread. - Checking to see how many manifests are available is now done by using `If ManifestPaths.Count = 0...` instead of `If ManifestPaths(0) = String.Empty` to make sure it doesn't break as easily. - Loading from the Sqlite database into a DataTable is now done Async to hopefully not make things lock up as much. In my testing, I have only noticed guinget's titlebar say "(Not Responding)" once or twice, though there were a lot of times Task Manager said it wasn't responding, but most people probably wouldn't have Task Manager open and looking at guinget's process in particular. - HiDPI Mode now hides the package list and shows it again after changing the height for each row. This should help improve performance, though it's still slow, so I still recommend toggling it before loading the package list. - Instead of using `AllCells` for the autosizemode for the `Action` and `Status` columns, they're now using `DisplayedCells`. Hopefully this speeds things up.
Once v0.4 is out, this'll be unpinned. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: