Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2299

Analyse BSON\Document::toCanonicalExtendedJSON performance

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • None

      json_encode($document->toPHP(['root' => 'array'])) is 4x faster than $document->toCanonicalExtendedJSON()

      Even if they don't produce the same output, their purpose and performance should be very similar.

      Related: https://github.com/mongodb/mongo-php-library/pull/1169#discussion_r1333978256

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: