RAM spiking when launching game

Basically, I mainly have one “big” widget that handles almost everything visual, like dialogues, background, interface, and more. The dialogue widgets call this specific widget, and they tell it which image to display as the background, dialogue, etc.

The “big” widget :

Its event construct (On its own, it doesn’t specify what to replace with images or dialogues, so there isn’t much there.) :

Here’s what you can find in a widget of a dialogue scene :
Each number represents the rank in the dialogue (I could have used a database, but I find it less practical). I use functions that automate the process; for example, when I want to change the background, I use the function “Affichage Background.”

And this is what’s inside that function:

This is how I work throughout the game:
A main widget that manages images and text.
A “current” widget that represents the scene the player is in, which acts on the first widget.
In this widget, there are functions that make coding easier.