perftools / xhgui

Web interface for XHProf profiling data can store data in MongoDB or PDO database
1.65k stars 341 forks source link

Update PdoRepository::initSchema() to create table with profile as LONGTEXT. #474

Closed Charl13 closed 1 year ago

Charl13 commented 2 years ago

In larger applications profile column of type TEXT exceeds maximum allowed characters of 65535 characters. This leads to data not showing in UI since json_decode() returns null on truncated JSON string.

Replaces https://github.com/perftools/xhgui/pull/437

glensc commented 2 years ago

The exact same problem as the previous one (where you came from, but didn't link here):

This is not portable for all storage providers! And marking as Draft to indicate this is far from ready for merge.

Charl13 commented 2 years ago

Right, missed that one.

What do you suggest? Extract initSchema() and make an adapter for it based on the driver name?

glensc commented 2 years ago

Simplest would be adopt based on driver name

Charl13 commented 2 years ago

Can I use doctrine/dbal to refactor the PdoRepository? This allows us to be more flexible on the database platform.

glensc commented 2 years ago

Read the comments in the previous PR, especially:

and use the new property to make conditions in code.

doctrine/dbal seems currently way overkill and considering they've made changes in minor versions such way that multiple of my projects just failed and had to StackOverflow to solve the problems, I personally wouldn't want to use doctrine/* at all at this time.

so let's leave bigger refactoring to the future.

glensc commented 2 years ago

Adding check for $this->driverName is pretty trivial. No longer interested of this?

glensc commented 1 year ago

Replaced by https://github.com/perftools/xhgui/pull/487