Skip to content
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

Editor pane not refreshing fast when updating text #25

Closed
jungle-boogie opened this issue May 16, 2021 · 20 comments
Closed

Editor pane not refreshing fast when updating text #25

jungle-boogie opened this issue May 16, 2021 · 20 comments

Comments

@jungle-boogie
Copy link

Hi,

This may need more experimenting and investigating on your part, because I'm not exactly certain what I'm seeing is related.

It seems saving a query (maybe multiple saves) cause the editor pane to become sluggish and doesn't update to edit/view the query.
The app never crashes or becomes unresponsive, but the editor pane doesn't refresh allowing you to see the text very well.

Thanks!

@jungle-boogie
Copy link
Author

Here's a video demo of what I'm explaining:

sqlite-gui-25.mp4

I actually didn't have any queries saved, so maybe it's the auto complete that's causing issues?

@jungle-boogie jungle-boogie changed the title Editor pane not refreshing fast after saves of query Editor pane not refreshing fast when updating text May 16, 2021
@little-brother
Copy link
Owner

Could you attach an query text?
How long does the app work before this behaviour?

@jungle-boogie
Copy link
Author

I started the recording just seconds after opeining the app.

I would suggest trying to make an elaborate query with the default DB and seeing if you get the same results.

@little-brother
Copy link
Owner

How do you change a words and their cases? I didn't see autocomplete and it doesn't like you input text as usual (maybe fps is not enough). Is it some hotkeys?

@jungle-boogie
Copy link
Author

jungle-boogie commented May 16, 2021 via email

@little-brother
Copy link
Owner

little-brother commented May 17, 2021

This issue can be related with a long query text and a slow PC.
Can you run the Task manager > Performance, edit the query and check CPU usage?

If you turn off a text highlighting in Settings, then the problem disappears?

@jungle-boogie
Copy link
Author

Hi,

My computer may be slower and older than yours, but I have an SSD drive and don't experience any slow issues with any other apps.

@jungle-boogie
Copy link
Author

Hi,

On a different PC, I see the same results. Highlighting text and replacing it causes the lag with typing.
Task Manager peeked at 18% CPU but only very briefly.

Could this be related to sqlite-gui trying to auto complete and it choking on something?

@little-brother
Copy link
Owner

little-brother commented May 17, 2021

but I have an SSD drive and don't experience any slow issues with any other apps.

It doesn't matter what kind of drive you are use. Currently the entire text is fully re-colorized on any change. It requires multiply non-disk API calls to an editor to colorize each word and extremely slow if the text is long enough. The solution is to colorize only the visible text. I try to implement it.

Please check a version without autocomplete - https://disk.yandex.ru/d/5ASPgXWCkR8E3Q to confirm or deny my suppose.

@jungle-boogie
Copy link
Author

Thanks for your analysis. I'll try that version of sqlite-gui out soon.

@jungle-boogie
Copy link
Author

jungle-boogie commented May 17, 2021

Hi,

There are some improvements but I still see the problem.

Now all the text appears very quickly after I stop typing, but it doesn't keep up with my typing. Sometimes pressing the down arrow key causes the updated text to appear.

Once I get it to happen the first time, it seems to always occur, just like before.

@little-brother
Copy link
Owner

Could you provide your OS, the query line count and CPU model?

Now all the text appears very quickly after I stop typing, but it doesn't keep up with my typing. Sometimes pressing the down arrow key causes the updated text to appear.

Hence, it's a not a highlighting issue and autocomplete is more likely.
The down arrow-key is a very strange. This button doesn't trigger the highlighing update. Maybe a caret is placed to parentheses?

@jungle-boogie
Copy link
Author

Could you provide your OS, the query line count and CPU model?

Windows 10 version 1809 OS build 17763.1879 on a Intel core i5-2400 cpu 3.10GHz

The query I'm executing is 14 lines, but it's only using 1 table in my database.

@little-brother
Copy link
Owner

little-brother commented May 17, 2021

i5 is more than enough to work without lags. So I need to get Win10 for testing because I use Win7x64 and I can't reproduce this bug. The Ctrl + Alt + Esc also works fine on WinXP/Win7.

Thanks for information.

@little-brother
Copy link
Owner

I repeated this error in Win10.
Also I noticed that under Win10 the app is much slower. Perhaps I should change a compiler.

@jungle-boogie
Copy link
Author

Oh, good to hear you were able to find a machine, and experience the same/similar problem.

@little-brother
Copy link
Owner

little-brother commented May 18, 2021

It looks like that msftedit.dll (is used for editors) in Win10 is a little buggish or works internally different :(
The silly solving is to place msftedit.dll (C:\Windows\SysWOW64\msftedit.dll) from Windows 7 to sqlite-gui folder.
P.S. Win10 file is 5 times larger that Win7.

@jungle-boogie
Copy link
Author

That DLL does seem to make a difference.

Do you also notice some improvements?

@little-brother
Copy link
Owner

little-brother commented May 18, 2021

With Win7 dll I couldn't reproduce the paint bug and (possibly) the app works faster.
I think to include this dll to the app distributive because it's the easiest to solve the problem.

@jungle-boogie
Copy link
Author

Yes, seems like app works faster with this DLL.

Glad we got this one taken care of - good job!

little-brother added a commit that referenced this issue May 19, 2021
+ "Save as" for database (issue #29)
+ Line number in a status bar (issue #22)
+ Line number in an error message (issue #23)
* Fix editor's bug in Win10 (issue #25)
* Fix issues: #18, #20, #21, #24, #26, #27, #28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants