public inbox for [email protected]  
help / color / mirror / Atom feed
Regarding issue #6510
7+ messages / 4 participants
[nested] [flat]

* Regarding issue #6510
@ 2025-05-20 05:16 Pravesh Sharma <[email protected]>
  2025-05-20 15:37 ` Re: Regarding issue #6510 Usman Khan <[email protected]>
  2025-05-20 15:49 ` Re: Regarding issue #6510 Zaid Shabbir <[email protected]>
  0 siblings, 2 replies; 7+ messages in thread

From: Pravesh Sharma @ 2025-05-20 05:16 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Hackers,

I am working on issue #6510
<https://github.com/pgadmin-org/pgadmin4/issues/6510;, where the result
grid slows down and sometimes hangs when large JSON or text data is present
in a table column. Upon investigation, I found that this is due to
rendering the entire JSON to the DOM. This causes slowness, especially with
large datasets; for example, rendering a 15MB JSON object for preview
purposes is unnecessary. I am proposing a solution where the result grid
will render data up to a certain length. I have implemented these changes,
and everything is working fine, resulting in a significant performance
improvement. As you can see in the screenshot, the JSON data is 20MB, and
on the result grid, we are displaying only 200 characters as it is only a
preview. I am also considering making this maximum display length a user
preference, named "Max column data display length," allowing them to
customize how much data they want to see. Can you tell me what you think of
this approach or if you have any suggestions?


Thanks,

Pravesh

[image: image.png]
-- 


Pravesh Sharma

Senior SDE

+91 9406461406


enterprisedb.com


Attachments:

  [image/png] image.png (170.3K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Regarding issue #6510
  2025-05-20 05:16 Regarding issue #6510 Pravesh Sharma <[email protected]>
@ 2025-05-20 15:37 ` Usman Khan <[email protected]>
  2025-05-21 04:34   ` Re: Regarding issue #6510 Pravesh Sharma <[email protected]>
  1 sibling, 1 reply; 7+ messages in thread

From: Usman Khan @ 2025-05-20 15:37 UTC (permalink / raw)
  To: Pravesh Sharma <[email protected]>; +Cc: pgadmin-hackers

Hi Pravesh,
Nice idea from your side but my concern is:

   - If the user increases this limit to 1GB(which is a maximum size for a
   column in pg) through the *'Max column data display length'* option,
   will the function not break again?


On Tue, May 20, 2025 at 10:16 AM Pravesh Sharma <
[email protected]> wrote:

> Hi Hackers,
>
> I am working on issue #6510
> <https://github.com/pgadmin-org/pgadmin4/issues/6510;, where the result
> grid slows down and sometimes hangs when large JSON or text data is present
> in a table column. Upon investigation, I found that this is due to
> rendering the entire JSON to the DOM. This causes slowness, especially with
> large datasets; for example, rendering a 15MB JSON object for preview
> purposes is unnecessary. I am proposing a solution where the result grid
> will render data up to a certain length. I have implemented these changes,
> and everything is working fine, resulting in a significant performance
> improvement. As you can see in the screenshot, the JSON data is 20MB, and
> on the result grid, we are displaying only 200 characters as it is only a
> preview. I am also considering making this maximum display length a user
> preference, named "Max column data display length," allowing them to
> customize how much data they want to see. Can you tell me what you think of
> this approach or if you have any suggestions?
>
>
> Thanks,
>
> Pravesh
>
> [image: image.png]
> --
>
>
> Pravesh Sharma
>
> Senior SDE
>
> +91 9406461406
>
>
> enterprisedb.com
>


Attachments:

  [image/png] image.png (170.3K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Regarding issue #6510
  2025-05-20 05:16 Regarding issue #6510 Pravesh Sharma <[email protected]>
  2025-05-20 15:37 ` Re: Regarding issue #6510 Usman Khan <[email protected]>
@ 2025-05-21 04:34   ` Pravesh Sharma <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: Pravesh Sharma @ 2025-05-21 04:34 UTC (permalink / raw)
  To: Usman Khan <[email protected]>; +Cc: pgadmin-hackers

Hi Usman,

The length is in the number of characters. So, if a user sets max length
500 then we will show data till 500 characters.

Thanks,
Pravesh

On Tue, May 20, 2025 at 9:08 PM Usman Khan <[email protected]> wrote:

> Hi Pravesh,
> Nice idea from your side but my concern is:
>
>    - If the user increases this limit to 1GB(which is a maximum size for
>    a column in pg) through the *'Max column data display length'* option,
>    will the function not break again?
>
>
> On Tue, May 20, 2025 at 10:16 AM Pravesh Sharma <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> I am working on issue #6510
>> <https://github.com/pgadmin-org/pgadmin4/issues/6510;, where the result
>> grid slows down and sometimes hangs when large JSON or text data is present
>> in a table column. Upon investigation, I found that this is due to
>> rendering the entire JSON to the DOM. This causes slowness, especially with
>> large datasets; for example, rendering a 15MB JSON object for preview
>> purposes is unnecessary. I am proposing a solution where the result grid
>> will render data up to a certain length. I have implemented these changes,
>> and everything is working fine, resulting in a significant performance
>> improvement. As you can see in the screenshot, the JSON data is 20MB, and
>> on the result grid, we are displaying only 200 characters as it is only a
>> preview. I am also considering making this maximum display length a user
>> preference, named "Max column data display length," allowing them to
>> customize how much data they want to see. Can you tell me what you think of
>> this approach or if you have any suggestions?
>>
>>
>> Thanks,
>>
>> Pravesh
>>
>> [image: image.png]
>> --
>>
>>
>> Pravesh Sharma
>>
>> Senior SDE
>>
>> +91 9406461406
>>
>>
>> enterprisedb.com
>>
>


Attachments:

  [image/png] image.png (170.3K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Regarding issue #6510
  2025-05-20 05:16 Regarding issue #6510 Pravesh Sharma <[email protected]>
@ 2025-05-20 15:49 ` Zaid Shabbir <[email protected]>
  2025-05-21 04:35   ` Re: Regarding issue #6510 Pravesh Sharma <[email protected]>
  1 sibling, 1 reply; 7+ messages in thread

From: Zaid Shabbir @ 2025-05-20 15:49 UTC (permalink / raw)
  To: Pravesh Sharma <[email protected]>; +Cc: pgadmin-hackers

Hello Pravesh

Nice implementation. In case someone wants to review the complete JSON, is
there a way to open the contents in a separate window (popup or side
window) on a click event? The entire larger string can be loaded on demand
when the click event is triggered.


Regards,
Zaid

On Tue, May 20, 2025 at 10:16 AM Pravesh Sharma <
[email protected]> wrote:

> Hi Hackers,
>
> I am working on issue #6510
> <https://github.com/pgadmin-org/pgadmin4/issues/6510;, where the result
> grid slows down and sometimes hangs when large JSON or text data is present
> in a table column. Upon investigation, I found that this is due to
> rendering the entire JSON to the DOM. This causes slowness, especially with
> large datasets; for example, rendering a 15MB JSON object for preview
> purposes is unnecessary. I am proposing a solution where the result grid
> will render data up to a certain length. I have implemented these changes,
> and everything is working fine, resulting in a significant performance
> improvement. As you can see in the screenshot, the JSON data is 20MB, and
> on the result grid, we are displaying only 200 characters as it is only a
> preview. I am also considering making this maximum display length a user
> preference, named "Max column data display length," allowing them to
> customize how much data they want to see. Can you tell me what you think of
> this approach or if you have any suggestions?
>
>
> Thanks,
>
> Pravesh
>
> [image: image.png]
> --
>
>
> Pravesh Sharma
>
> Senior SDE
>
> +91 9406461406
>
>
> enterprisedb.com
>


Attachments:

  [image/png] image.png (170.3K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Regarding issue #6510
  2025-05-20 05:16 Regarding issue #6510 Pravesh Sharma <[email protected]>
  2025-05-20 15:49 ` Re: Regarding issue #6510 Zaid Shabbir <[email protected]>
@ 2025-05-21 04:35   ` Pravesh Sharma <[email protected]>
  2025-05-21 05:26     ` Re: Regarding issue #6510 Aditya Toshniwal <[email protected]>
  0 siblings, 1 reply; 7+ messages in thread

From: Pravesh Sharma @ 2025-05-21 04:35 UTC (permalink / raw)
  To: Zaid Shabbir <[email protected]>; +Cc: pgadmin-hackers

Hi Zaid,

We do already have that, this implementation is only for data grid when we
click on the cell we can see the entire JSON content.

Thanks,
Pravesh

On Tue, May 20, 2025 at 9:19 PM Zaid Shabbir <[email protected]> wrote:

> Hello Pravesh
>
> Nice implementation. In case someone wants to review the complete JSON, is
> there a way to open the contents in a separate window (popup or side
> window) on a click event? The entire larger string can be loaded on demand
> when the click event is triggered.
>
>
> Regards,
> Zaid
>
> On Tue, May 20, 2025 at 10:16 AM Pravesh Sharma <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> I am working on issue #6510
>> <https://github.com/pgadmin-org/pgadmin4/issues/6510;, where the result
>> grid slows down and sometimes hangs when large JSON or text data is present
>> in a table column. Upon investigation, I found that this is due to
>> rendering the entire JSON to the DOM. This causes slowness, especially with
>> large datasets; for example, rendering a 15MB JSON object for preview
>> purposes is unnecessary. I am proposing a solution where the result grid
>> will render data up to a certain length. I have implemented these changes,
>> and everything is working fine, resulting in a significant performance
>> improvement. As you can see in the screenshot, the JSON data is 20MB, and
>> on the result grid, we are displaying only 200 characters as it is only a
>> preview. I am also considering making this maximum display length a user
>> preference, named "Max column data display length," allowing them to
>> customize how much data they want to see. Can you tell me what you think of
>> this approach or if you have any suggestions?
>>
>>
>> Thanks,
>>
>> Pravesh
>>
>> [image: image.png]
>> --
>>
>>
>> Pravesh Sharma
>>
>> Senior SDE
>>
>> +91 9406461406
>>
>>
>> enterprisedb.com
>>
>


Attachments:

  [image/png] image.png (170.3K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Regarding issue #6510
  2025-05-20 05:16 Regarding issue #6510 Pravesh Sharma <[email protected]>
  2025-05-20 15:49 ` Re: Regarding issue #6510 Zaid Shabbir <[email protected]>
  2025-05-21 04:35   ` Re: Regarding issue #6510 Pravesh Sharma <[email protected]>
@ 2025-05-21 05:26     ` Aditya Toshniwal <[email protected]>
  2025-05-21 06:46       ` Re: Regarding issue #6510 Zaid Shabbir <[email protected]>
  0 siblings, 1 reply; 7+ messages in thread

From: Aditya Toshniwal @ 2025-05-21 05:26 UTC (permalink / raw)
  To: Pravesh Sharma <[email protected]>; +Cc: Zaid Shabbir <[email protected]>; pgadmin-hackers

Hi,

To add what Pravesh mentioned - There is no change in any existing
behaviour. The user can still copy and edit everything as before. The only
change is what is visible on the result grid, which will also be
customisable. Most users will anyway prefer to double click and open to see
the data instead of scrolling horizontally a large column.

On Wed, May 21, 2025 at 10:05 AM Pravesh Sharma <
[email protected]> wrote:

> Hi Zaid,
>
> We do already have that, this implementation is only for data grid when we
> click on the cell we can see the entire JSON content.
>
> Thanks,
> Pravesh
>
> On Tue, May 20, 2025 at 9:19 PM Zaid Shabbir <[email protected]>
> wrote:
>
>> Hello Pravesh
>>
>> Nice implementation. In case someone wants to review the complete JSON,
>> is there a way to open the contents in a separate window (popup or side
>> window) on a click event? The entire larger string can be loaded on demand
>> when the click event is triggered.
>>
>>
>> Regards,
>> Zaid
>>
>> On Tue, May 20, 2025 at 10:16 AM Pravesh Sharma <
>> [email protected]> wrote:
>>
>>> Hi Hackers,
>>>
>>> I am working on issue #6510
>>> <https://github.com/pgadmin-org/pgadmin4/issues/6510;, where the result
>>> grid slows down and sometimes hangs when large JSON or text data is present
>>> in a table column. Upon investigation, I found that this is due to
>>> rendering the entire JSON to the DOM. This causes slowness, especially with
>>> large datasets; for example, rendering a 15MB JSON object for preview
>>> purposes is unnecessary. I am proposing a solution where the result grid
>>> will render data up to a certain length. I have implemented these changes,
>>> and everything is working fine, resulting in a significant performance
>>> improvement. As you can see in the screenshot, the JSON data is 20MB, and
>>> on the result grid, we are displaying only 200 characters as it is only a
>>> preview. I am also considering making this maximum display length a user
>>> preference, named "Max column data display length," allowing them to
>>> customize how much data they want to see. Can you tell me what you think of
>>> this approach or if you have any suggestions?
>>>
>>>
>>> Thanks,
>>>
>>> Pravesh
>>>
>>> [image: image.png]
>>> --
>>>
>>>
>>> Pravesh Sharma
>>>
>>> Senior SDE
>>>
>>> +91 9406461406
>>>
>>>
>>> enterprisedb.com
>>>
>>

-- 
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com*
<https://www.enterprisedb.com/;
"Don't Complain about Heat, Plant a TREE"


Attachments:

  [image/png] image.png (170.3K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Regarding issue #6510
  2025-05-20 05:16 Regarding issue #6510 Pravesh Sharma <[email protected]>
  2025-05-20 15:49 ` Re: Regarding issue #6510 Zaid Shabbir <[email protected]>
  2025-05-21 04:35   ` Re: Regarding issue #6510 Pravesh Sharma <[email protected]>
  2025-05-21 05:26     ` Re: Regarding issue #6510 Aditya Toshniwal <[email protected]>
@ 2025-05-21 06:46       ` Zaid Shabbir <[email protected]>
  0 siblings, 0 replies; 7+ messages in thread

From: Zaid Shabbir @ 2025-05-21 06:46 UTC (permalink / raw)
  To: Aditya Toshniwal <[email protected]>; +Cc: Pravesh Sharma <[email protected]>; pgadmin-hackers

Hi,

Nice to hear about the implementation. Overall, the grid looks fine to me,
with one minor adjustment related to the value JSONB default column width:
I suggest reducing the  *default width* to approximately half its current
size, since—if someone wants to view the full JSON—they can simply
double-click to expand it. In this scenario, a very wide column looks bulky
on the screen.

Regards,
Zaid

On Wed, May 21, 2025 at 10:27 AM Aditya Toshniwal <
[email protected]> wrote:

> Hi,
>
> To add what Pravesh mentioned - There is no change in any existing
> behaviour. The user can still copy and edit everything as before. The only
> change is what is visible on the result grid, which will also be
> customisable. Most users will anyway prefer to double click and open to see
> the data instead of scrolling horizontally a large column.
>
> On Wed, May 21, 2025 at 10:05 AM Pravesh Sharma <
> [email protected]> wrote:
>
>> Hi Zaid,
>>
>> We do already have that, this implementation is only for data grid when
>> we click on the cell we can see the entire JSON content.
>>
>> Thanks,
>> Pravesh
>>
>> On Tue, May 20, 2025 at 9:19 PM Zaid Shabbir <[email protected]>
>> wrote:
>>
>>> Hello Pravesh
>>>
>>> Nice implementation. In case someone wants to review the complete JSON,
>>> is there a way to open the contents in a separate window (popup or side
>>> window) on a click event? The entire larger string can be loaded on demand
>>> when the click event is triggered.
>>>
>>>
>>> Regards,
>>> Zaid
>>>
>>> On Tue, May 20, 2025 at 10:16 AM Pravesh Sharma <
>>> [email protected]> wrote:
>>>
>>>> Hi Hackers,
>>>>
>>>> I am working on issue #6510
>>>> <https://github.com/pgadmin-org/pgadmin4/issues/6510;, where the
>>>> result grid slows down and sometimes hangs when large JSON or text data is
>>>> present in a table column. Upon investigation, I found that this is due to
>>>> rendering the entire JSON to the DOM. This causes slowness, especially with
>>>> large datasets; for example, rendering a 15MB JSON object for preview
>>>> purposes is unnecessary. I am proposing a solution where the result grid
>>>> will render data up to a certain length. I have implemented these changes,
>>>> and everything is working fine, resulting in a significant performance
>>>> improvement. As you can see in the screenshot, the JSON data is 20MB, and
>>>> on the result grid, we are displaying only 200 characters as it is only a
>>>> preview. I am also considering making this maximum display length a user
>>>> preference, named "Max column data display length," allowing them to
>>>> customize how much data they want to see. Can you tell me what you think of
>>>> this approach or if you have any suggestions?
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Pravesh
>>>>
>>>> [image: image.png]
>>>> --
>>>>
>>>>
>>>> Pravesh Sharma
>>>>
>>>> Senior SDE
>>>>
>>>> +91 9406461406
>>>>
>>>>
>>>> enterprisedb.com
>>>>
>>>
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com*
> <https://www.enterprisedb.com/;
> "Don't Complain about Heat, Plant a TREE"
>


Attachments:

  [image/png] image.png (170.3K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2025-05-21 06:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-05-20 05:16 Regarding issue #6510 Pravesh Sharma <[email protected]>
2025-05-20 15:37 ` Usman Khan <[email protected]>
2025-05-21 04:34   ` Pravesh Sharma <[email protected]>
2025-05-20 15:49 ` Zaid Shabbir <[email protected]>
2025-05-21 04:35   ` Pravesh Sharma <[email protected]>
2025-05-21 05:26     ` Aditya Toshniwal <[email protected]>
2025-05-21 06:46       ` Zaid Shabbir <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox