Обсуждение: Copy & paste key commands not working correctly
Hi, I sometimes experience the following strange behaviour with pgAdmin v1.22.0 under Arch using Gnome Shell 3.18.2: When I copy or cut out text, the following Ctrl+V doesn't insert the copied (or cut) text, but something I previously had copied in a different application (if any). The context menu actions and the command from the menu do work though. This happens like every other time I use these command in pgAdmin and appears to be quite annoying as you can imagine. Any clue what this behaviour is about? I have only seen this in pgAdmin so far. Best Johannes
<p dir="ltr">It happens often to me in Ubuntu 14.04 as well. It sometimes also happens with the toolbar icons too. It seemsto have to do with timing, because if I wait 5 seconds or so, it usually works. It seems to take longer to copy moretext. The problem appears to worsen with long queries, and after using copy/paste a few times, but it does not alwayshappen. Sometimes the keyboard begins to respond very slowly, such that if a second or so does not pass between keystrokes,many of them do not get written, and you can see the lag in the cursor. <p dir="ltr">The problem has existedfor several versions of pgAdmin, including 1.20, which I am now using. <br /><div class="gmail_quote">On Feb 7, 20161:09 PM, "johannes graën" <<a href="mailto:johannes@selfnet.de">johannes@selfnet.de</a>> wrote:<br type="attribution"/><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br/><br /> I sometimes experience the following strange behaviour with pgAdmin<br /> v1.22.0under Arch using Gnome Shell 3.18.2:<br /><br /> When I copy or cut out text, the following Ctrl+V doesn't insertthe<br /> copied (or cut) text, but something I previously had copied in a<br /> different application (if any). Thecontext menu actions and the<br /> command from the menu do work though. This happens like every other<br /> time I usethese command in pgAdmin and appears to be quite annoying<br /> as you can imagine.<br /><br /> Any clue what this behaviouris about? I have only seen this in pgAdmin so far.<br /><br /> Best<br /><br /> Johannes<br /><br /><br /> --<br/> Sent via pgadmin-support mailing list (<a href="mailto:pgadmin-support@postgresql.org">pgadmin-support@postgresql.org</a>)<br/> To make changes to your subscription:<br/><a href="http://www.postgresql.org/mailpref/pgadmin-support" rel="noreferrer" target="_blank">http://www.postgresql.org/mailpref/pgadmin-support</a><br/></blockquote></div>
On Sun, Feb 7, 2016 at 8:00 PM, Gabriel Sánchez <gabrielesanchez@gmail.com> wrote: > It happens often to me in Ubuntu 14.04 as well. It sometimes also happens > with the toolbar icons too. It seems to have to do with timing, because if I > wait 5 seconds or so, it usually works. It seems to take longer to copy more > text. The problem appears to worsen with long queries, and after using > copy/paste a few times, but it does not always happen. Sometimes the > keyboard begins to respond very slowly, such that if a second or so does not > pass between keystrokes, many of them do not get written, and you can see > the lag in the cursor. I found that for copying multiple use of Ctrl+C usually works, while Ctrl+X cuts out text without storing it in the clipboard, i.e. a subsequent Ctrl+V has no effect. Undoing and redoing the cut operation usually works thought.
<p dir="ltr">The same happens to me. Although copying and waiting usually works for me. <p dir="ltr">Have others experiencedthis behavior? It appears not to affect windows. Are the developers aware of this? Have they tried fixing itor do they plan to fix it? It could be that this is a bug in wxWidgets rather than pgAdmin, and if it has been fixed thereit might be a matter of updating the library and recompiling. <div class="gmail_quote">On Feb 9, 2016 5:10 AM, "johannesgraën" <<a href="mailto:johannes@selfnet.de">johannes@selfnet.de</a>> wrote:<br type="attribution" /><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Feb 7, 2016at 8:00 PM, Gabriel Sánchez<br /> <<a href="mailto:gabrielesanchez@gmail.com">gabrielesanchez@gmail.com</a>> wrote:<br/> > It happens often to me in Ubuntu 14.04 as well. It sometimes also happens<br /> > with the toolbar iconstoo. It seems to have to do with timing, because if I<br /> > wait 5 seconds or so, it usually works. It seems totake longer to copy more<br /> > text. The problem appears to worsen with long queries, and after using<br /> > copy/pastea few times, but it does not always happen. Sometimes the<br /> > keyboard begins to respond very slowly, suchthat if a second or so does not<br /> > pass between keystrokes, many of them do not get written, and you can see<br/> > the lag in the cursor.<br /><br /> I found that for copying multiple use of Ctrl+C usually works, while<br/> Ctrl+X cuts out text without storing it in the clipboard, i.e. a<br /> subsequent Ctrl+V has no effect. Undoingand redoing the cut operation<br /> usually works thought.<br /></blockquote></div>
<br /><br /><div class="moz-cite-prefix">On 02/09/2016 08:55 AM, Gabriel Sánchez wrote:<br /></div><blockquote cite="mid:CANHuRqFFvAD8m5+aWR8yHs6340_K6Y75K9ZFpMaYWdQ7y-+RVw@mail.gmail.com"type="cite"><p dir="ltr">The same happens tome. Although copying and waiting usually works for me. <p dir="ltr">Have others experienced this behavior? It appearsnot to affect windows. Are the developers aware of this? Have they tried fixing it or do they plan to fix it? It couldbe that this is a bug in wxWidgets rather than pgAdmin, and if it has been fixed there it might be a matter of updatingthe library and recompiling. <div class="gmail_quote">On Feb 9, 2016 5:10 AM, "johannes graën" <<a href="mailto:johannes@selfnet.de"moz-do-not-send="true">johannes@selfnet.de</a>> wrote:<br type="attribution" /><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Feb7, 2016 at 8:00 PM, Gabriel Sánchez<br /> <<a href="mailto:gabrielesanchez@gmail.com" moz-do-not-send="true">gabrielesanchez@gmail.com</a>>wrote:<br /> > It happens often to me in Ubuntu 14.04 as well.It sometimes also happens<br /> > with the toolbar icons too. It seems to have to do with timing, because if I<br/> > wait 5 seconds or so, it usually works. It seems to take longer to copy more<br /> > text. The problem appearsto worsen with long queries, and after using<br /> > copy/paste a few times, but it does not always happen. Sometimesthe<br /> > keyboard begins to respond very slowly, such that if a second or so does not<br /> > pass betweenkeystrokes, many of them do not get written, and you can see<br /> > the lag in the cursor.<br /><br /> I foundthat for copying multiple use of Ctrl+C usually works, while<br /> Ctrl+X cuts out text without storing it in the clipboard,i.e. a<br /> subsequent Ctrl+V has no effect. Undoing and redoing the cut operation<br /> usually works thought.<br/></blockquote></div></blockquote> I am running openSUSE Leap 42.1 using Gnome with pgadmin 1.23 dev and I don'tsee this behaviour.<br /> Are you guys running a clipboard manager? I use gpaste which cooperates with d-bus, and Gnomeputs a nice little icon at top right of my screen alongside all the other status icons, so I can very quickly checkthe list of copied items to see if the copy was successful. I hardly ever do that though, pasting seems to give me whatI need every time, and if I need something from the history list it is just a click or two away.<br />
<br /><br /><div class="moz-cite-prefix">On 02/09/2016 09:39 AM, Colin Beckingham wrote:<br /></div><blockquote cite="mid:56B9FA21.4040708@kingston.net"type="cite"><br /><br /><div class="moz-cite-prefix">On 02/09/2016 08:55 AM, GabrielSánchez wrote:<br /></div><blockquote cite="mid:CANHuRqFFvAD8m5+aWR8yHs6340_K6Y75K9ZFpMaYWdQ7y-+RVw@mail.gmail.com"type="cite"><p dir="ltr">The same happens tome. Although copying and waiting usually works for me. <p dir="ltr">Have others experienced this behavior? It appearsnot to affect windows. Are the developers aware of this? Have they tried fixing it or do they plan to fix it? It couldbe that this is a bug in wxWidgets rather than pgAdmin, and if it has been fixed there it might be a matter of updatingthe library and recompiling. <div class="gmail_quote">On Feb 9, 2016 5:10 AM, "johannes graën" <<a href="mailto:johannes@selfnet.de"moz-do-not-send="true">johannes@selfnet.de</a>> wrote:<br type="attribution" /><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun,Feb 7, 2016 at 8:00 PM, Gabriel Sánchez<br /> <<a href="mailto:gabrielesanchez@gmail.com" moz-do-not-send="true">gabrielesanchez@gmail.com</a>>wrote:<br /> > It happens often to me in Ubuntu 14.04 as well.It sometimes also happens<br /> > with the toolbar icons too. It seems to have to do with timing, because if I<br/> > wait 5 seconds or so, it usually works. It seems to take longer to copy more<br /> > text. The problem appearsto worsen with long queries, and after using<br /> > copy/paste a few times, but it does not always happen. Sometimesthe<br /> > keyboard begins to respond very slowly, such that if a second or so does not<br /> > pass betweenkeystrokes, many of them do not get written, and you can see<br /> > the lag in the cursor.<br /><br /> I foundthat for copying multiple use of Ctrl+C usually works, while<br /> Ctrl+X cuts out text without storing it in the clipboard,i.e. a<br /> subsequent Ctrl+V has no effect. Undoing and redoing the cut operation<br /> usually works thought.<br/></blockquote></div></blockquote> I am running openSUSE Leap 42.1 using Gnome with pgadmin 1.23 dev and I don'tsee this behaviour.<br /> Are you guys running a clipboard manager? I use gpaste which cooperates with d-bus, and Gnomeputs a nice little icon at top right of my screen alongside all the other status icons, so I can very quickly checkthe list of copied items to see if the copy was successful. I hardly ever do that though, pasting seems to give me whatI need every time, and if I need something from the history list it is just a click or two away.<br /><br /></blockquote>I use Kubuntu, which comes with Klipper, but I haven't been paying attention to it. I'll pay attention thenext time I encounter bad behavior in pgAdmin.<br /><br />
On Tue, Feb 9, 2016 at 2:55 PM, Gabriel Sánchez <gabrielesanchez@gmail.com> wrote: > The same happens to me. Although copying and waiting usually works for me. I've got a new clue. Although cut + paste inserts the wrong text, the cutted text is available to other programs afterwards. So my guess would be that pgadmin just uses the wrong clipboard to insert from.
On Tue, Feb 9, 2016 at 2:55 PM, Gabriel Sánchez
<gabrielesanchez@gmail.com> wrote:
> The same happens to me. Although copying and waiting usually works for me.
I've got a new clue. Although cut + paste inserts the wrong text, the
cutted text is available to other programs afterwards. So my guess
would be that pgadmin just uses the wrong clipboard to insert from.
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Tue, Feb 16, 2016 at 11:52 AM, Dave Page <dpage@pgadmin.org> wrote: > My best guess is that when you use Ctrl+V, some other control on the window > actually has focus and is "swallowing" the keypress before our code sees it. > Can you confirm that the SQL textbox is definitely the focussed control when > you hit Ctrl+V? Does it work properly then? I'm navigating inside the textbox with the cursor keys when I do cut & paste, so it definitely has the focus.
On Tue, Feb 16, 2016 at 11:52 AM, Dave Page <dpage@pgadmin.org> wrote:
> My best guess is that when you use Ctrl+V, some other control on the window
> actually has focus and is "swallowing" the keypress before our code sees it.
> Can you confirm that the SQL textbox is definitely the focussed control when
> you hit Ctrl+V? Does it work properly then?
I'm navigating inside the textbox with the cursor keys when I do cut &
paste, so it definitely has the focus.
Hmm. I just spent time here trying to reproduce this on RHEL 7 and it seems to work fine there.
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Tue, Feb 16, 2016 at 12:00 PM, Dave Page <dpage@pgadmin.org> wrote: > Where did your build come from? What version of wxWidgets is it using? It's an official Arch package: https://www.archlinux.org/packages/community/x86_64/pgadmin3/ The wxWidgets version is 2.8.12.1: https://www.archlinux.org/packages/extra/x86_64/wxgtk2.8/
On Tue, Feb 16, 2016 at 12:00 PM, Dave Page <dpage@pgadmin.org> wrote:
> Where did your build come from? What version of wxWidgets is it using?
It's an official Arch package:
https://www.archlinux.org/packages/community/x86_64/pgadmin3/
The wxWidgets version is 2.8.12.1:
https://www.archlinux.org/packages/extra/x86_64/wxgtk2.8/
That should be OK (some distros have started using wxWidgets 3, which we don't fully support).
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
<p dir="ltr"><br /> On Feb 16, 2016 7:04 AM, "Dave Page" <<a href="mailto:dpage@pgadmin.org">dpage@pgadmin.org</a>>wrote:<br /> ><br /> ><br /> ><br /> > On Tue, Feb 16,2016 at 11:06 AM, johannes graën <<a href="mailto:johannes@selfnet.de">johannes@selfnet.de</a>> wrote:<br /> >><br/> >> On Tue, Feb 16, 2016 at 12:00 PM, Dave Page <<a href="mailto:dpage@pgadmin.org">dpage@pgadmin.org</a>>wrote:<br /> >> > Where did your build come from? Whatversion of wxWidgets is it using?<br /> >><br /> >> It's an official Arch package:<br /> >> <a href="https://www.archlinux.org/packages/community/x86_64/pgadmin3/">https://www.archlinux.org/packages/community/x86_64/pgadmin3/</a><br />><br /> ><br /> > Huh, they have some weird dependencies listed there, that should not be needed. That's not aproblem though.<br /> > <br /> >><br /> >><br /> >><br /> >> The wxWidgets version is <a href="http://2.8.12.1">2.8.12.1</a>:<br/> >> <a href="https://www.archlinux.org/packages/extra/x86_64/wxgtk2.8/">https://www.archlinux.org/packages/extra/x86_64/wxgtk2.8/</a><br />><br /> ><br /> > That should be OK (some distros have started using wxWidgets 3, which we don't fully support).<br/> ><br /> > I've done some more testing on CentOS 6, and cannot reproduce a problem there either. I'mbeginning to wonder if it's something more distro-specific, perhaps related to the version of GTK in use, or the windowmanager. That makes it *far* more difficult to track down unfortunately.<br /> ><br /> > Are you in a positionto be able to install the EDB PostgreSQL installer? I'm curious to know if the build of pgAdmin that's included withthat works OK. It was built against a fairly old version of GTK for maximum compatibility with different distros.<br/> ><br /> > <a href="http://www.enterprisedb.com/products-services-training/pgdownload">http://www.enterprisedb.com/products-services-training/pgdownload</a><br />><br /> ><p dir="ltr">I have the problem in Kububtu with the version downloaded from edb. As far as I can tell, pgAdminis not copying text when I hit copy either by keyboard, shortcut, or menu. I checked my clipboard manager last timethis happened and the text was not there. Again, it doesn't happen always, but it persists in a pgAdmin window once itbegins to happen, and the copy does happen eventually. Other laggy behavior showing up when this happens (such as takinga full second to respond to a key press, and not registering all key presses when this happens and I nevertheless typefast) suggests to me that the problem is very slow cursor movement or text processing. <p dir="ltr">I have been tryingto notice a pattern of what triggers it, but have not seen any. It does happen often on windows with long queries andafter several copy paste ops within the window or between pgAdmin windows. But not always. However I use many other programsand only see this bug with pgAdmin. <p dir="ltr">Just want to add my thanks for this project, Dave. Great program,and I'm looking forward to v4! <p dir="ltr">> -- <br /> > Dave Page<br /> > Blog: <a href="http://pgsnake.blogspot.com">http://pgsnake.blogspot.com</a><br/> > Twitter: @pgsnake<br /> ><br /> > EnterpriseDBUK: <a href="http://www.enterprisedb.com">http://www.enterprisedb.com</a><br /> > The Enterprise PostgreSQLCompany<br />
<br /><br /><div class="moz-cite-prefix">On 02/16/2016 07:23 AM, Gabriel Sánchez wrote:<br /></div><blockquote cite="mid:CANHuRqFhj7PiUfiXnU_DE8eDT5mws6QzitbR9Cfb3OhRZ6aMfA@mail.gmail.com"type="cite"><p dir="ltr"><br /> On Feb 16, 20167:04 AM, "Dave Page" <<a href="mailto:dpage@pgadmin.org" moz-do-not-send="true"><a class="moz-txt-link-abbreviated"href="mailto:dpage@pgadmin.org">dpage@pgadmin.org</a></a>> wrote:<br /> ><br /> ><br/> ><br /> > On Tue, Feb 16, 2016 at 11:06 AM, johannes graën <<a href="mailto:johannes@selfnet.de" moz-do-not-send="true"><aclass="moz-txt-link-abbreviated" href="mailto:johannes@selfnet.de">johannes@selfnet.de</a></a>>wrote:<br /> >><br /> >> On Tue, Feb 16, 2016at 12:00 PM, Dave Page <<a href="mailto:dpage@pgadmin.org" moz-do-not-send="true"><a class="moz-txt-link-abbreviated"href="mailto:dpage@pgadmin.org">dpage@pgadmin.org</a></a>> wrote:<br /> >> >Where did your build come from? What version of wxWidgets is it using?<br /> >><br /> >> It's an officialArch package:<br /> >> <a href="https://www.archlinux.org/packages/community/x86_64/pgadmin3/" moz-do-not-send="true">https://www.archlinux.org/packages/community/x86_64/pgadmin3/</a><br/> ><br /> ><br /> >Huh, they have some weird dependencies listed there, that should not be needed. That's not a problem though.<br /> > <br /> >><br /> >><br /> >><br /> >> The wxWidgets version is <a href="http://2.8.12.1" moz-do-not-send="true">2.8.12.1</a>:<br/> >> <a href="https://www.archlinux.org/packages/extra/x86_64/wxgtk2.8/" moz-do-not-send="true">https://www.archlinux.org/packages/extra/x86_64/wxgtk2.8/</a><br/> ><br /> ><br /> > Thatshould be OK (some distros have started using wxWidgets 3, which we don't fully support).<br /> ><br /> > I'vedone some more testing on CentOS 6, and cannot reproduce a problem there either. I'm beginning to wonder if it's somethingmore distro-specific, perhaps related to the version of GTK in use, or the window manager. That makes it *far* moredifficult to track down unfortunately.<br /> ><br /> > Are you in a position to be able to install the EDB PostgreSQLinstaller? I'm curious to know if the build of pgAdmin that's included with that works OK. It was built againsta fairly old version of GTK for maximum compatibility with different distros.<br /> ><br /> > <a href="http://www.enterprisedb.com/products-services-training/pgdownload" moz-do-not-send="true">http://www.enterprisedb.com/products-services-training/pgdownload</a><br/> ><br /> ><p dir="ltr">Ihave the problem in Kububtu with the version downloaded from edb. As far as I can tell, pgAdmin is not copyingtext when I hit copy either by keyboard, shortcut, or menu. I checked my clipboard manager last time this happenedand the text was not there. Again, it doesn't happen always, but it persists in a pgAdmin window once it begins tohappen, and the copy does happen eventually. Other laggy behavior showing up when this happens (such as taking a full secondto respond to a key press, and not registering all key presses when this happens and I nevertheless type fast) suggeststo me that the problem is very slow cursor movement or text processing. <p dir="ltr">I have been trying to noticea pattern of what triggers it, but have not seen any. It does happen often on windows with long queries and after severalcopy paste ops within the window or between pgAdmin windows. But not always. However I use many other programs andonly see this bug with pgAdmin. <p dir="ltr">Just want to add my thanks for this project, Dave. Great program, and I'mlooking forward to v4! </blockquote><br /> Following up, I upgraded from 1.20 to 1.22.1 from a fresh EDB download. Iopened a query window, copied in some text, and began copy-pasting and typing randomly, and was able to reproduce the bugwithin a minute. I recorded video, which you can get here:<br /><br /><a class="moz-txt-link-freetext" href="http://www.filedropper.com/screencast2016-02-16100737">http://www.filedropper.com/screencast2016-02-16100737</a><br /><br/> You can see that I am selecting text. Following every selection, I quickly do a copy, and then I move the cursorsomewhere and do a paste. I also type random keys. Everything works as expected until about 0:34, when I try to pasteand it doesn't. Then I type quickly "asdfjkl;" many times, and you can see only a few of those keys are typed, andthe response is laggy. I try pasting several times again in the lines below, but it still doesn't work (0:40). I typeagain, and response seems to be a bit better. I try paste again and this time it works (0:46). While on this videoit seems to have recovered, my experience has been that it doesn't. It's especially annoying when you have a sessionwith temporary tables that take a long time to prepare, because it costs time to start a new session and re-make thetemporary tables. <br /><br /> Once again, many thanks for your attention to this. <br /><br /><blockquote cite="mid:CANHuRqFhj7PiUfiXnU_DE8eDT5mws6QzitbR9Cfb3OhRZ6aMfA@mail.gmail.com"type="cite"><p dir="ltr">> -- <br /> >Dave Page<br /> > Blog: <a href="http://pgsnake.blogspot.com" moz-do-not-send="true">http://pgsnake.blogspot.com</a><br/> > Twitter: @pgsnake<br /> ><br /> > EnterpriseDB UK:<a href="http://www.enterprisedb.com" moz-do-not-send="true">http://www.enterprisedb.com</a><br /> > The EnterprisePostgreSQL Company<br /></blockquote><br />
On Tue, Feb 16, 2016 at 1:04 PM, Dave Page <dpage@pgadmin.org> wrote: > Are you in a position to be able to install the EDB PostgreSQL installer? > I'm curious to know if the build of pgAdmin that's included with that works > OK. It was built against a fairly old version of GTK for maximum > compatibility with different distros. I tried that, but pgadmin won't be executed because of a library missing which is not available on my system.
On 02/16/2016 07:23 AM, Gabriel Sánchez wrote:
On Feb 16, 2016 7:04 AM, "Dave Page" <dpage@pgadmin.org> wrote:
>
>
>
> On Tue, Feb 16, 2016 at 11:06 AM, johannes graën <johannes@selfnet.de> wrote:
>>
>> On Tue, Feb 16, 2016 at 12:00 PM, Dave Page <dpage@pgadmin.org> wrote:
>> > Where did your build come from? What version of wxWidgets is it using?
>>
>> It's an official Arch package:
>> https://www.archlinux.org/packages/community/x86_64/pgadmin3/
>
>
> Huh, they have some weird dependencies listed there, that should not be needed. That's not a problem though.
>
>>
>>
>>
>> The wxWidgets version is 2.8.12.1:
>> https://www.archlinux.org/packages/extra/x86_64/wxgtk2.8/
>
>
> That should be OK (some distros have started using wxWidgets 3, which we don't fully support).
>
> I've done some more testing on CentOS 6, and cannot reproduce a problem there either. I'm beginning to wonder if it's something more distro-specific, perhaps related to the version of GTK in use, or the window manager. That makes it *far* more difficult to track down unfortunately.
>
> Are you in a position to be able to install the EDB PostgreSQL installer? I'm curious to know if the build of pgAdmin that's included with that works OK. It was built against a fairly old version of GTK for maximum compatibility with different distros.
>
> http://www.enterprisedb.com/products-services-training/pgdownload
>
>I have the problem in Kububtu with the version downloaded from edb. As far as I can tell, pgAdmin is not copying text when I hit copy either by keyboard, shortcut, or menu. I checked my clipboard manager last time this happened and the text was not there. Again, it doesn't happen always, but it persists in a pgAdmin window once it begins to happen, and the copy does happen eventually. Other laggy behavior showing up when this happens (such as taking a full second to respond to a key press, and not registering all key presses when this happens and I nevertheless type fast) suggests to me that the problem is very slow cursor movement or text processing.
I have been trying to notice a pattern of what triggers it, but have not seen any. It does happen often on windows with long queries and after several copy paste ops within the window or between pgAdmin windows. But not always. However I use many other programs and only see this bug with pgAdmin.
Just want to add my thanks for this project, Dave. Great program, and I'm looking forward to v4!
Following up, I upgraded from 1.20 to 1.22.1 from a fresh EDB download. I opened a query window, copied in some text, and began copy-pasting and typing randomly, and was able to reproduce the bug within a minute. I recorded video, which you can get here:
http://www.filedropper.com/screencast2016-02-16100737
You can see that I am selecting text. Following every selection, I quickly do a copy, and then I move the cursor somewhere and do a paste. I also type random keys. Everything works as expected until about 0:34, when I try to paste and it doesn't. Then I type quickly "asdfjkl;" many times, and you can see only a few of those keys are typed, and the response is laggy. I try pasting several times again in the lines below, but it still doesn't work (0:40). I type again, and response seems to be a bit better. I try paste again and this time it works (0:46). While on this video it seems to have recovered, my experience has been that it doesn't. It's especially annoying when you have a session with temporary tables that take a long time to prepare, because it costs time to start a new session and re-make the temporary tables.
Once again, many thanks for your attention to this.
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Вложения
Hi, On Fri, Feb 19, 2016 at 12:42 PM, Dave Page <dpage@pgadmin.org> wrote: > Can you test the attached patch please? I've done various tests with gprof > to profile the code whilst copying/pasting text in the query tool up to > about 20MB worth. I found a couple of optimisations that seem to make good > improvements here, and only see issues with very large files, most notably > when the editor is doing brace matching over megabytes of text (which seems > unavoidable). I managed to compile pgadmin3 with the patch you provided. The bug is still there, I see exactly the same behaviour as before. Best Johannes
Another interesting finding: When pasting text from another application, the text doesn't appear the first time I press Ctrl+V, but on the second keypress, always.