Skip to main content

Plone’s getObjPositionInParent catalog index is optimized for fast writing and for sorting small result sets of objects which are loaded anyway in the request. The actual order is not stored in the catalog at all but only on the parent object. This means that sorting a result set can only be done by loading the parent object and getting the object position from it.

This works well for Plone’s standard use cases such as the navigation portlet or the portal tabs, but doing large queries with a bigger depth is very slow since all container objects must be woken up.

The goal of this package is to replace the getObjPositionInParent with an actual index storing the order in the catalog in a regular FieldIndex.

Compatibility

Plone 4.3.x Plone 5.1.x

Installation

  • Add the package to your buildout configuration:

[instance]
eggs +=
    ...
    ftw.gopip
  • Install the generic setup profile ftw.gopip:default.

Implementation

This package replaces the GopipIndex, which is a fake index not storing any data, with a FieldIndex, which stores all positions.

The challenge is to keep the index properly up to date. This is achieved by customizing the standard IOrdering adapters and tracking changes there, so that we do not need to rely on other components triggering events at the right moment.

The three standard IOrdering adapters are wrapped with a tracking proxy:

  • DefaultOrdering (providing IExplicitOrdering)

  • PartialOrdering (providing IExplicitOrdering)

  • UnorderedOrdering (providing IOrdering)

If there are custom IOrdering or IExplicitOrdering adapters, they must be tracked accordingly.

There is no IOrdering adapter for the Plone site root. An IReorderedEvent-subsciber takes care of tracking first level reorderings.

Development

  1. Fork this repo

  2. Clone your fork

  3. Shell: ln -s development.cfg buildout.cfg

  4. Shell: python boostrap.py

  5. Shell: bin/buildout

  6. Shell: bin/test to test your changes.

Or start an instance by running bin/instance fg.

Metadata

Release files for ftw.gopip 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ftw.gopip 1.1.0
File Size Uploaded Provenance Actions
ftw.gopip-1.1.0.tar.gz 8.8 kB Without provenance Details for ftw.gopip-1.1.0.tar.gz

Release files / ftw.gopip-1.1.0.tar.gz

Download URL ftw.gopip-1.1.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
49a14c346efcf146a66e29656520940341573c17534751379f230fdd7a0c8d3a
BLAKE2b-256 checksum
How to use checksums
8ba172111d2a3c5c6c24a1db5642ea7109b779095df32e33abf2363aed070c24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for ftw.gopip 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page