Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hWIQ9-00080w-Qw for pgadmin-hackers@arkaria.postgresql.org; Thu, 30 May 2019 10:36:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hWIQ8-0005ks-IW for pgadmin-hackers@arkaria.postgresql.org; Thu, 30 May 2019 10:36:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hWIQ8-0005fU-5u for pgadmin-hackers@lists.postgresql.org; Thu, 30 May 2019 10:36:28 +0000 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hWIQ3-0002JW-Pj for pgadmin-hackers@postgresql.org; Thu, 30 May 2019 10:36:26 +0000 Received: by mail-lf1-x141.google.com with SMTP id l26so4586627lfh.13 for ; Thu, 30 May 2019 03:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y3KaHfLF/hBV71WvgCTXqi6RuGfpBlOk0DytejRZEx0=; b=knEC6piAdjAT9aLDbHrhWRoYfOH79CPlytnl4KtJvDY9tcbx/qgZJ6LEJIOtk3j4om zYcpIeEs2e2FOjNTJ0nsj+RjSe4RHhLm18VaInkqTAJOJAwg61vxBLRPyeteUrUR7sXb W2TVPdMzSdPOyY85T65zlNod0NiaAgcWPlPAaHvX1GSuF56ajPvzGJln/5ONnjzpf9C8 7DRGMinssfnUIbOyUICz+WvLH7iZ1E3HPFxY8P1fAmHXpa5AbK+XWsSBkVA8mGi9j3ii WHhC+cwnZWVHy+b/BOS9mD13seHaSZbn2Dgz6jIYYB3Fuwb1cWi2azXV52sYRTlR59en UeSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y3KaHfLF/hBV71WvgCTXqi6RuGfpBlOk0DytejRZEx0=; b=C/Y4eFroiqEJsQ2RZmV3dVMp5ov2gTfuArwsz4VYKAM/nf5TuuHT/1tc5jL9YG+Z8e rjQvng5YbWqqlIYhNRew9OwhEzHtueJRVkhZhxkcxb0nCkkg9mFw+IhYWSCnoMUwsrJf 2wclJfc/vXfAKxeTkCheAdJVbF5suH+fWiIO9QL0tq/YRVcJC5pI/neYXUUbMyyiM1+8 CMb2AMvmSln0KVUpCM7QQ+m2Ny9iEY4OAEzeqviEZQQGDqrf4hLf1ytyIk07s2hpwPW6 E67H/bYqZ+pRAOKNFP1DXKplmfOkD5zec9Z2BqPKDHNgKUS0wANaTnhUgtJkdUg/fRDS LSVA== X-Gm-Message-State: APjAAAWBr7xUOU+h64U25awQ5/0u2RUHkHlqt9gH9y/E7s/a+ZBdE55S 1Us8TkV5S0b+UpxU94T9+/SfwBJKgYrK6gCOUgOuFQ== X-Google-Smtp-Source: APXvYqzeTdIn4szEXhkwyXT/fW06wFYfyhHIcWT0dKyw5gwvko9bD1dRUbh8Z5cK+SeUL3We+vn/LB1KLhqEeOdasPU= X-Received: by 2002:a19:9784:: with SMTP id z126mr1820632lfd.70.1559212582046; Thu, 30 May 2019 03:36:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Thu, 30 May 2019 16:05:46 +0530 Message-ID: Subject: Re: [RM#4307][pgAdmin4] Graphical Explain Plan - Embed images in explain plan only when user try to download it To: Murtuza Zabuawala Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000001522e3058a187873" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000001522e3058a187873 Content-Type: text/plain; charset="UTF-8" Hi Murtuza, I was just going through code change, and I would suggest one small change. In the image_mapper.js, export it as default, as it will have only one export. Then you can use it as imageMapper.default rather than imageMapper. imageMapper. Otherwise, looks fine to me. I didn't test though :P On Thu, May 30, 2019 at 2:41 PM Murtuza Zabuawala < murtuza.zabuawala@enterprisedb.com> wrote: > Hi, > > Embedding images using *.toDataURL()* method hits the performance of the > explain plan rendering if the plan is complex because first it downloads > the images then it will convert each images into base64, to improve the > performance we will embed the images only when downloading of SVG is called > and not when displaying the graphical plan. > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > -- Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB India | Pune "Don't Complain about Heat, Plant a TREE" --0000000000001522e3058a187873 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Murtuza,

I was just going through code change, a= nd I would suggest one small change.
In the image_mapper.js, export it= as default, as it will have only one export. Then you can use it as imageM= apper.default rather than=C2=A0imageMapper.imageMapper.
Otherwise, looks fine to me. I didn&#= 39;t test though :P


On Thu, May 30= , 2019 at 2:41 PM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,

Embedding images using .toDataURL() m= ethod hits the performance of the explain plan rendering if the plan is com= plex because first it downloads the images then it will convert each images= into base64, to improve the performance we will embed the images only when= downloading of SVG is called and not when displaying=C2=A0the graphical pl= an.

--
Regards,<= div>M= urtuza Zabuawala
EnterpriseDB:=C2=A0http://www.enterprisedb.comThe Enterprise PostgreSQL Company



--
Adi= tya Toshniwal
Software Engineer |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain a= bout Heat, Plant a TREE"
--0000000000001522e3058a187873--