CurrentPage.Children() seems slow locally

Hello again :slight_smile:

I am upgrading an old umbraco site to U17, and for the most part the front end UI is zippy fast. The back office is a bit slower but that’s not new news.

However when I go to query CurrentPage.Children() the site grinds to a halt. And sure, there are quite a few children to call but I had other sites in U13 that have had similar numbers that are fast, in that they take no more than 30 seconds. However CurrentPage.Children() is currently taking in excess of 5+ minutes to load.

And sure, once loaded into memory the pages are zippy fast again… but then when I restart my project as and when I make code changes it slows down again.

Are there any settings we should be adding to Umbraco so that caches aren’t lost on a restart of VS?

Hi @bythewiseman

It could be the hybrid cache is not loading these on start-up so the first hit is the cache being loaded, then subsequent calls are quicker. It may be worth you seeing what settings you can change to pre-load these on start-up if the extra start-up time is acceptable.

How many child content items do you have?

Justin

Ahhhh got ya.

So it is either slow start up with the cache seeding, or a slow initial hit on my listing page. I like the idea of the slower start up because I usually hit the run button and go and do something else :smiley:

And when it is on live, it won’t be a slow start up for the website as we will be closer to the database, on power Azure machines and have warmup slots.

Thank you, appreciate the help.