-
-
Notifications
You must be signed in to change notification settings - Fork 565
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
Cell limited preloaded values - better handling #3269
Comments
It could simply be a setting with a limit (say, 500 chars), and maybe a warning about settings it too high. Having no control and no info about this is quite confusing, I think. |
Is there no way at all to get the full value, if it exceeds 100 chars? I thought it applies to Grid views only, but the same thing happens with Form view. I second the opinion of @protegesolutions that there should be a setting for that. But in addition, it would be really nice if there was a way to also get the full value (not necessarily as a Grid View), but maybe directly to text or something similar. At least that way full data can be accessible from within the program. |
This limitation is introduced to protect memory usage (imagine table with 5 columns, 1000 rows, each cell having 1MB od data = 5 * 1000 MB = 5GB of RAM). I implemented it, because some users actually reported this case to happen. Regardless of above, as this issue is stating, I'm planning on making it better. |
Thank you for your explanation and for all your hard work. This is the best SQLite Manager! Didn't know about editing the value trick. The limitation makes sense of course. Perhaps the way to handle it would be to silently load full data only for selected row(s) (controllable via an option). At least that would take care of the common copy-paste usage case, so that a selected value can be copied to clipboard in full, even if only a fraction of the text is actually visible inside the grid view cell. As for the Form View, unfortunately this is not my case with 3.2.1:
|
Can you show me the exact SELECT query you're using for this? |
In this case |
I see. The use of "GROUP BY" clause prevents SQLiteStudio from complementary loading of full value of particular cell (as ROWID is ambigous in GROUP BY). Now... what could be done in this scenario? The problem here is that on one side we want to limit size of preloaded values due to memory limitations in some cases (like I described 4 posts above). Then on the other side this optimization fails to load full value in case of DISTINCT, or GROUP BY, or expression columns, because in these cases it is no certain what the ROWID is to load data for. Any ideas on how to load full value for such cell? I suppose repeating entire original query and wrapping it up with another level of outer SELECT would work, because we could refer to the cell's row by its index (using OFFSET and LIMIT), but I'm not sure how performant would that be. Still it could be the best effort solution available. Unless someone can think of better way? |
Thank you for this explanation. I did not think that having In my view the best, and probably easiest to implement, solution would be to give user full control over whether or not and to what degree to truncate cell values - done via configurable option (either on a program level, or on a per-query/view level - via toggle / dropdown: "Truncate to: 100, 1000, 10000, OFF"). Perhaps the only time truncation should be forced is when dealing with really large values, say well in excess of 1M. After all user normally knows (or at least can guess) how much data will be involved and whether or not there is sufficient RAM. Besides, there is already a setting to limit the number of rows displayed in the Grid, so cautious users can set it to be pretty low (like 50 for example) to really make sure they won't run into memory issues when loading unknown data with cell value truncation turned off. This approach (giving control over truncation to the user) would significantly increase program's usefulness, as 100 chars limit is just way too low: Urls, tweets, file paths, short descriptions can all be easily a few 100 chars long, so 1000 char limit, in my view would be the smallest viable alternative. Also, offering 64-bit version would also ease memory requirements. |
I agree. Having it configurable (and default value at 1000 or even more) makes perfect sense. That's both simple and efficient way and that's how it's going to be implemented. |
An idea of a temporary workaround (or even as a permanent solution that would be fine with me), you could set the display to show something like "..." or maybe "<...>" at the end of any column that has the data truncated...so at least you know to open in form view if you want to see the whole thing. I think as long as we know when it is occurring, we can deal with it. |
Or perhaps data can be dynamically loaded on demand. For instance, clearly just for display purposes a few hundred characters in nearly always enough. However when you navigate to the cell to: edit data, copy data to clipboard, or resize cell to view more of its contents - that's when the entire data is needed. So perhaps, the DataGrid control can be modified such that when full data is needed (cell enters edit mode, or Ctrl-C is pressed on the cell / row / rows), it would fetch the entire data under the covers. My main concern is how to always be able to easily get to underlying data in Grid mode (Form mode is not always available). |
Actually it is currently implemented in this very way - it loads full contents if it's necessary (for example when editing its value, or copying contents), whereas only first 100 characters are preloaded for initial display. Problem is that it's not "fully loaded" when user resizes (enlarges) the cell view and I was thinking about addressing it, but it's not easy to determin when the data should be loaded, because font is not regular (thus different characters can result in different width), sometimes data contains newlines, sometimes binary (not printable) data. Yet another problem is that if you resize 1 column and you have 1000 rows loaded, you have to track 1000 cells at the same time, where resizing action performed by user produces lots of events in the application. Multiply it by 1000 and it becomes clumsy. I'm thinking about adding sort of "..." at the end as @fitdev mentioned, but I would also make it as a clickable button or a link, so user can explicitly request loading full contents if they are pending. I'm open for more ideas. Maybe someone has even better ones. |
@pawelsalawa I don't think the approach of accurately calculating the number of characters to load based on column width is feasible. It's too much work and complicated. I do like your idea of adding a clickable button or link at the end in all cells with truncated values. Perhaps that with 2 menu items - Copy and Edit would be enough. Whereby Copy would copy the entire contents to clipboard, while Edit could open it up in a new window / tab for editing. However I think the ability to select rows and be able to copy them in full is still useful. So perhaps it, too, can be addressed but at some later point. |
I have been having the same battle... I have columns that store books of crap... and I am small potatoes. The FORMview though is better than none, is really cumbersome, having to constantly resize the cells is murder, trying to resize a CELL when towards the bottom of the screen is a down-right-mess. The current implementation needs to be scrapped, period! But not until a better solution is implemented. There are basically 2 choices
Bells and whistles
|
Perhaps Form View can be better utilized / used as a Details view in the Master-Details paradigm? Thus, it could co-exist within the same window, or inside a new detachable window (in case of multiple screens) and be automatically updated for every selected row in the grid view. Of course whether or not such a Form view would support editing will depend on how the grid view was generated. If it was part of a select query (as opposed to being a direct table edit), then it should be read-only. Otherwise, it could act as a true form for data entry. With this approach full data should be loaded for the currently selected row only. |
Hi all I would like to vote for adjustable string length for the grid view. This value can be put into options (configuration dialog) to give a user ability to adjust the view according to his needs. Not everybody works with 10MB strings, but it would be good to see more than 100 characters in the grid in many cases. |
Please address this issue. And, btw, thank you for taking the time to develop SQLiteStudio and for making it available for free. It's a must-have. Best of its kind, imo. |
Note - once fixing this, it should be checked whether the FK editor (ComboBox) in grid view inherits fixed behavior (it should, but better verify this). |
… first, but now there is an indicator (button) showing up when there is more to load and user can press it to load full data for the cell. User can also load full values in entire column using right-click on the column's header and picking option from context menu.
"Load full values" isn't working for me in version 3.3.0. Here's my query:
|
What do you mean it does not work?
|
In your previous comment you wrote:
|
After you loaded values, did you resize column (to be wider) to see remaining part? |
Works on queries as expected. Does not work on |
@LaraSQP Works for me. Are you following the same steps as I described above on screenshots? |
Thanks for the quick reply. Like I said, it works on queries as expected (able to load full values, etc). So much appreciated. It would be nice if it also worked on the |
@LaraSQP Yes, I understand. Like I said, it works for me, as far as I checked, therefor I'm trying to figure out what are you doing differently, that it doesn't work for you. |
What a weird circular conversation. When I run a query, I see those blue arrows and can "load full values", etc. When I go to the |
Hold on. I just found some blue arrows on some entries in the Not all, but some. It appears the blue arrows are not showing up consistently. I will test further and see if I can report a reproducible bug. |
So... as I said earlier - go through my explanation with screenshots above. See where I point out "...". If you see this, it means that you need to resize your column to bigger, because there is more text to show. If you resize it enough that you hit "the limit", then the blue arrow will show up. Everything works, your columns are just to narrow and the remaining part of values are hidden. |
Yes and no. On further review, getting the program to load the full values depends on the column width being "wide enough" in a way I do not understand. I would expect that if I right click the column header and select "Load full values", that the program would do so immediately, without checking the current column width. That dependency is very confusing. Also, it can be difficult to make a column "wide enough" when it is the last column because I have no room (to the right) to resize the column. Double-clicking the column border (to auto-fit to the widest value) can also fail in this situation. The "widest value" calculation may not be based on the "full value" of a cell that I requested "Load full value" on? |
As far as I try it, it does not depend on it. If you want to see entire value without resizing column, you should either switch to Form View (where always full value is loaded to each editor field) or you should right-click on a cell and pick "Edit in value editor" (or use Alt+Enter shortcut). |
I just tested again, and now it works! Copying the values is also suddenly working (copying the full values), even though I did not use the "Load full value" feature. Yesterday, if I copied a value it would be truncated. One setting I changed today was "Number of memorized table populating configurations". I changed it to zero, then back to the default (100). I changed the setting [for a different reason] and do not know if it solved my problem, or if it is unrelated. Since I can not reproduce the issue now, I will not be able to help any further. Sorry! |
I think that more likely was that you were running older version of SQLiteStudio for some time yesterday. Wouldn't it be possible? |
Impossible, for two reasons:
|
Copying values to clipboard has already been loading full values transparently (even in version 3.2.1). There is no need to explicitly click "load full values". I have no clue why it wasn't working for you yesterday. Since I cannot reproduce it (and now neither can you), I have no way to fix it. |
Not exactly. The text in some columns is being truncated without an ellipsis, just chopped off mid-word. Could it be that the horizontal size of the text is not calculated correctly when custom fonts are used? I'm using DejaVu Sans Mono 12. |
I'm not sure. So you're saying there is no ellipsis. Okay. If you resize such column, the contents remain chopped off at the same point of text (no more test shows up as you keep enlarging it) and no "load full value" appears? If the answer is "yes", then what happens when you select this cell and switch to "Form View" - does it have full value loaded there? |
The most reliable way to reproduce it is to open a table, go to the "Data" tab, and double-click on the column separator in the header (to auto-adjust the column). As you scroll down, you can see the text will be chopped in entries that are too long. A subsequent double-click on the column separator in the header will expand the column further, now showing the blue arrows (right-aligned), but the text remains chopped where it was (no repaint, I guess). Editing the content in place or viewing it in the "Form view" tab shows the entire text. So no problems in that regard. It is only the missing ellipsis, blue arrows, and chopped text. That is, the visual candy. Thus, it is a minor issue and I am happy with the situation as is. |
It works as expected. It chops off at 100 characters, as that's the limit. If you try to show more (by resizing) an arrow appears to indicate to you "Do you want to see more of this value? Click me to load!". |
Alright then. |
Details
Cells with preloaded data limited should have better handling. A lot of people are confused by truncated value to 100 characters. It should either read full value if column is expanded, or perhaps show some kind of notification about limited values. Maybe even something else?
The text was updated successfully, but these errors were encountered: