SDL2 - very slow

Hi,
I run simple scrolling program on my NanoPi board. http://nanopi.io/nanopi-a64.html
Code more or less is almost here:
http://www.willusher.io/sdl2%20tutorials/2013/12/18/lesson-6-true-type-fonts-with-sdl_ttf
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){
	SDL_RenderClear(renderer);
	//We can draw our message as we do any other texture, since it's been
	//rendered to a texture
	renderTexture(image, renderer, x, y);
	x=x-10;
	if (x<-500) x=1280;
	SDL_RenderPresent(renderer);
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,
Piotr

What does the renderTexture() function do?

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

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