Thread: Beta 1.6: Output Headers refresh in slow motion

Beta 1.6: Output Headers refresh in slow motion

From
"Harald Armin Massa"
Date:
I am totally fascinated with 1.6 ... and do more and more queries in that joyfull Query window!<br /><br />The
"underliningof the errornous character" is really a big help for small typing misstakes, GREAT!<br /><br />On the Data
Outputgrid, something could be better: those grey column headers get refreshed in slow motion. <br /><br />It happens
whenI switch pgadmin to the background and then back to the foreground ... they blob in one after the other, with a
clearrecognizable delay between each.<br /><br />Also with queries with bigger result sets from distant (as in WAN)
server:data rather flashes into the grid, but the headers drop in one by one; as if every header has to be confirmed by
atleast 1 core developer. <br /><br />It seems to get slower over time ... that is with more concurrently open output
panesor longer runtime of pgadmin; but that is not confirmed yet.<br /><br />Same "slow motion" is happening on
resizingthe output pane panel. <br /><br />Harald<br /><br clear="all" /><br />-- <br />GHUM Harald Massa<br
/>persuadereet programmare<br />Harald Armin Massa<br />Reinsburgstraße 202b<br />70197 Stuttgart<br />0173/9409607<br
/>-<br/>Let's set so double the killer delete select all.  

Re: Beta 1.6: Output Headers refresh in slow motion

From
"Dave Page"
Date:
 


From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Harald Armin Massa
Sent: 15 September 2006 15:08
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] Beta 1.6: Output Headers refresh in slow motion

I am totally fascinated with 1.6 ... and do more and more queries in that joyfull Query window!

The "underlining of the errornous character" is really a big help for small typing misstakes, GREAT!

On the Data Output grid, something could be better: those grey column headers get refreshed in slow motion.

It happens when I switch pgadmin to the background and then back to the foreground ... they blob in one after the other, with a clear recognizable delay between each.

Also with queries with bigger result sets from distant (as in WAN) server: data rather flashes into the grid, but the headers drop in one by one; as if every header has to be confirmed by at least 1 core developer.

It seems to get slower over time ... that is with more concurrently open output panes or longer runtime of pgadmin; but that is not confirmed yet.

Same "slow motion" is happening on resizing the output pane panel. 
 
What's happening is that when the grid control redraws itself, it asks the dataset what the header labels should be. The dataset then queries the database to get the correct typename (because libpq's PGresult only stores the type OIDs) for each column.
 
I've committed a fix that will cache the type names as they are requested so that after the initial display, subsequent redraws won't cause any queries to be sent to the backend.
 
Of course, this behaviour doesn't show up on a fast PC running the server on localhost :-)
 
Regards, Dave.

Re: Beta 1.6: Output Headers refresh in slow motion

From
"Harald Armin Massa"
Date:

Same "slow motion" is happening on resizing the output pane panel. 
 
What's happening is that when the grid control redraws itself, it asks the dataset what the header labels should be. The dataset then queries the database to get the correct typename (because libpq's PGresult only stores the type OIDs) for each column.

Hmmm.... isn't the relation type OID -> type fixed for every given instance of a database?
Maybe it would be even quicker to have a local cache of

typeOID -> typeName

So even new queries will get their column headers quick.
 
>I've committed a fix that will cache the type names as they are requested so that after the >initial display, subsequent redraws won't cause any queries to be sent to the backend.

Thats fine.
Of course, this behaviour doesn't show up on a fast PC running the server on localhost :-)

Aaaah... now I know why with at 1600 (4pm) that redraw grew faster ... most people left the office, so the WAN was more responsive :)

Thanks for caching,

Harald


--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Let's set so double the killer delete select all.

Re: Beta 1.6: Output Headers refresh in slow motion

From
"Dave Page"
Date:
 


From: Harald Armin Massa [mailto:haraldarminmassa@gmail.com]
Sent: 15 September 2006 16:57
To: Dave Page
Cc: pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] Beta 1.6: Output Headers refresh in slow motion


Same "slow motion" is happening on resizing the output pane panel. 
 
What's happening is that when the grid control redraws itself, it asks the dataset what the header labels should be. The dataset then queries the database to get the correct typename (because libpq's PGresult only stores the type OIDs) for each column.

Hmmm.... isn't the relation type OID -> type fixed for every given instance of a database?
Maybe it would be even quicker to have a local cache of

typeOID -> typeName

So even new queries will get their column headers quick 
 
Aside from the non-trivial architectural changes this would require, there are also cache invalidation issues to consider - one instance of pgAdmin can use multiple connections to the same database, each of which would need it's own cache and even tracking and invalidating them would be difficult, never mind changes from other developers (in fact, they would require at least one query per cache access to check for changes anyway).
  
Maybe something could be could be done for 1.8, but not for 1.6. 
>I've committed a fix that will cache the type names as they are requested so that after the >initial display, subsequent redraws won't cause any queries to be sent to the backend.

Thats fine.
Of course, this behaviour doesn't show up on a fast PC running the server on localhost :-)

Aaaah... now I know why with at 1600 (4pm) that redraw grew faster ... most people left the office, so the WAN was more responsive :) 
 
:-)
 
Regards, Dave .