Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizations for sites with hundreds of SQL queries #148

Closed
wants to merge 2 commits into from

Conversation

brablc
Copy link
Contributor

@brablc brablc commented Oct 17, 2014

I keep getting following error in Firebug (2.0.4) and FirePHP (0.7.4):

"There was a problem writ...ePHP/FirebugConsole/0.1", SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

This error shows up, when there is more than one chunk of json stream created. I actually do not know how to fix json stream, but I have found, that even payload of size 100kB can be sent in one chunk and Firefox displays it just fine. So I suggest to let user specify the length of the chunk.

Additionally I think, that saving some CPU cycles, by setting constant headers only once may be a good idea. However, compared to the payload being json_encoded for each SQL statement this does not seem like noticable improvement.

@dg dg force-pushed the master branch 8 times, most recently from 601dbd2 to 26b167f Compare January 12, 2015 10:01
@dg
Copy link
Owner

dg commented Jan 13, 2015

Thanks!

@dg dg closed this in 39be00e Jan 13, 2015
jasir added a commit to jasir/dibi that referenced this pull request Mar 2, 2015
* master: (37 commits)
  Released version 2.3.1
  removed version.txt
  dibi: named connections are allowed [Closes dg#161]
  Dibi: Dump now recognize MsSql2012 offset as keyword
  DibiPdoDriver: added support for MsSql2012 Offset
  Tracy\Panel: added vector icon
  added contributing.md
  Released version 2.3.0
  Postgre: added test for matching by %like
  Postgre: fixed %like escaping [Closes dg#159]
  Dibi: $defaultDriver changed to mysqli [Closes dg#156]
  Released 2.3.0-RC1
  removed bridge for Nette 2.0 (BC break)
  dibi: named connections and activate() are deprecated (BC break)
  DibiFluent: add `leftJoin` and `on` to phpdoc.
  DibiFirePhpLogger: save some header operations for sites with hundreds of sql queries.
  DibiFirePhpLogger: Allow user defined size of json stream chunks [Closes dg#148]
  DibiTranslator: respect %if blocks for %lmt and %ofs as well [Closes dg#145][Closes dg#87]
  DibiResult: float detection locale fix [Closes dg#154]
  DibiMySqliDriver.php: fixes for HHVM
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants