plone / plone/plone.restapi

Pasting objects takes a long time

Open
#1,934 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
109
Forks
107
Avg merge
2d 3h
Merged PRs (30d)
4

Description

When we are going to paste multiple objects into a folder, it is taking a long time. I see that the manage_pasteObjects method is called once for each object, inside a for:

https://github.com/plone/plone.restapi/blob/ae90f0e56e50e81c344fb3d0c84bc6cfc8310cab/src/plone/restapi/services/copymove/copymove.py#L82-L85

Doesn't this slow down the operation?

I see that in Plone Classic it is called only once:

https://github.com/plone/plone.app.content/blob/a61a7d2335b0d24b15cae9d9422b376a948177e6/plone/app/content/browser/contents/paste.py#L41

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/plone/restapi/services/copymove/copymove.py at lines 82-85 and compare the single-call flow in plone/app/content/browser/contents/paste.py at line 41. Determine how multiple pasted objects are passed through the REST endpoint and whether the operation can avoid calling manage_pasteObjects once per object; done means multi-object pasting preserves its behavior without the repeated-call slowdown.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.