Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-1199

RepositoryQuery.php exhaust memory on large SPARQL Result xml parsing

    Details

      Description

      Current RepositoryQuery.php implementation, https://github.com/Islandora/tuque/blob/1.x/RepositoryQuery.php#L37-L69
      loads the whole result document into memory using a simplexml element and iterates over it's children using foreach in two nested loops. This behaviour works well for small-medium results or when the answer is limited to a few 1000+- responses. But on large queries, this triggers quick memory exhaustion inside the foreach structure.
      Since php 5.1.x XMLReader() is enabled by default. It enables huge xml files to be parsed element by element with minimum memory usage.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dpinokrayon Diego Pino Navarro
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 week
                1w
                Remaining:
                Remaining Estimate - 1 week
                1w
                Logged:
                Time Spent - Not Specified
                Not Specified