public inbox for [email protected]
help / color / mirror / Atom feedFrom: Harshal Dhumal <[email protected]>
To: Surinder Kumar <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: pgAdmin 4 commit: Cleanup handling of default/null values when data edi
Date: Sun, 28 May 2017 22:55:56 +0530
Message-ID: <CAFiP3vwkX6N+6P21YmPZ6HgrZGjmCLVQWdqdXnzpdi0XVsirwg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi,
This commit has some performance issues with row paste functionality.
For 2K copied rows with 3 columns (2 integer and one null column) it took
near about 10 seconds to complete paste operation. And entire application
becomes unresponsive for those 10 seconds.
This is mainly because for each single pasted row entire grid is
re-rendered ( is what I see in code).
Ideally grid should be re-rendered only once after all rows are provided to
grid.
below code snippet from _paste_rows function
_.each(copied_rows, function(row) {
var new_row = arr_to_object(row);
new_row.is_row_copied = true;
row = new_row;
self.temp_new_rows.push(count);
grid.onAddNewRow.notify(
{item: new_row, column: self.columns[0] , grid:grid}
)
grid.setSelectedRows([]);
count++;
});
The statement
grid.onAddNewRow.notify(
{item: new_row, column: self.columns[0] , grid:grid}
)
causes grid to re-render (as we listener on onAddNewRow event where we
re-render the grid)
--
*Harshal Dhumal*
*Sr. Software Engineer*
EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Sun, May 28, 2017 at 12:21 AM, Dave Page <[email protected]> wrote:
> Cleanup handling of default/null values when data editting. FIxes #2400
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=
> 1f26953504a963d2c2223c51f9da29db4d48594b
> Author: Surinder Kumar <[email protected]>
>
> Modified Files
> --------------
> .../static/js/slickgrid/slick.pgadmin.editors.js | 58 ++++-
> web/pgadmin/tools/sqleditor/command.py | 5 +
> .../sqleditor/templates/sqleditor/js/sqleditor.js | 254
> ++++++++++++---------
> 3 files changed, 205 insertions(+), 112 deletions(-)
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: pgAdmin 4 commit: Cleanup handling of default/null values when data edi
In-Reply-To: <CAFiP3vwkX6N+6P21YmPZ6HgrZGjmCLVQWdqdXnzpdi0XVsirwg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox