Reduce delay in keypress (input) in Query Tool

From: Dhiraj Chawla <dhiraj(dot)chawla(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Reduce delay in keypress (input) in Query Tool
Date: 2012-11-05 14:38:48
Message-ID: CAJgtxT4D2AweWT2xgXv8d5tLVHtuxC5RAtw45yyz+kANsjG9QA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave,

It has been noticed that on certain systems, that typing into the Query
Tool is extremely slow and characters get printed very slowly. The probable
reason behind this is on each key press in Query Tool OnChangeStc() gets
called in frmQuery which in turn calls updateMenu(). In updateMenu() we
call the canSaveAsImage(), which internally updates the ModelSize of GQB
with the updateModelSize() function.

Attached is the patch that fixes this issue by disabling the call
to canSaveAsImage() when called updateMenu() is called from OnChangeStc().
In this way the model size of GQB won't get updated on press of each key.

Let me know views/thoughts on the same.

Thanks,

--
regards,

*Dhiraj Chawla*
Software Engineer
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Phone: +91-20-30589522

Attachment Content-Type Size
pgadmin_reduce_keypress_delay_in_query_tool.patch application/octet-stream 1.9 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2012-11-06 11:35:29 Re: pgAdmin with SSHTunneling support
Previous Message Akshay Joshi 2012-11-05 12:19:20 Re: pgAdmin with SSHTunneling support