[MAGNOLIA-5390] Revisit the MarkNodeAsDeleted command Created: 15/Oct/13  Updated: 19/Dec/16

Status: Open
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Jozef Chocholacek Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: next
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

The change introduced in MAGNOLIA-5337 means that all subnodes are processed (i.e. the mixin mgnl:deleted is added, mgnl:renderable is set to ui-admincentral:deleted and mgnl:lastModified is updated).

This is not a big problem for "slim" node types like contacts, categories etc., but it means a huge overhead for e.g. pages, where a single page can contain a big number of subnodes (areas, components) - especially because node.getSession().save(); is called for each node.

Originally there was a filter just for mgnl:content node types, but this led to problems described in MAGNOLIA-5337. The fix there actually works, but introduces the above described problem.

The solution could be to pass a list of allowed node types to the MarkNodeAsDeletedCommand and process only nodes with such types.



 Comments   
Comment by Jozef Chocholacek [ 15/Oct/13 ]

Btw. it also noticeably increases the time to process the command - c/a 30 times (from ±1 second to more than 30 seconds) for deletion of a page with just few sub-pages (e.g. /demo-project/about) in my development environment.

Comment by Jan Haderka [ 15/Oct/13 ]

Not all subnodes. Only subpages (nodes of type mgnl:page should be marked as deleted. Everything else should be deleted immediately.

Generated at Mon Feb 12 04:04:42 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.