SDL2 - very slow

I run simple scrolling program on my NanoPi board.
Code more or less is almost here:
I hoped to see clear animation. but result is awful.
Without any delays this loop is performed less than 10 times per second! It is hopeless slow for my project.
CPU usage is huge: 75% for process and over 50% for Xorg

I am not sure if GPU is used but it should be:
SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);

while (!quit){
	//We can draw our message as we do any other texture, since it's been
	//rendered to a texture
	renderTexture(image, renderer, x, y);
	if (x<-500) x=1280;
t = std::time(0);
std::cout << t << std::endl;

Before that I did animation on Cairo and effect was much better but CPU usage was also high.

Do You have any experience with SDL on NanoPi or similar systems???
best regards,

What does the renderTexture() function do?

Try putting in a delay and see if that helps. SDL_Delay(10) is fine for

I looked at the willusher code and it seems he’s opening the font file in the renderTexture function

that seems like a really bad (dumb) thing to do because the renderTexture function is called every frame

he even mentions the performance warning – so that’s probably your problem