Slow performance, any ideas?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
emptybox
Prole
Posts: 3
Joined: Mon Mar 05, 2012 4:41 am

Slow performance, any ideas?

Post by emptybox »

Hey, I just started using Love2d since yesterday. Everything went quite well, but when I run my "hello world" it seems that my system is slowed down a lot. Any ideas?

BTW, I am using Linux Mint 64bit, my system is: i5-2320, 6g ram, ATI 6450.

Thanks!
User avatar
Ensayia
Party member
Posts: 399
Joined: Sat Jun 12, 2010 7:57 pm

Re: Slow performance, any ideas?

Post by Ensayia »

If you post a .love file we can take a look at it and give you a better idea.

It's easy for new users to misplace one or two bits of code and create a massive unintentional performance drain. Chances are we can help you figure it out.
emptybox
Prole
Posts: 3
Joined: Mon Mar 05, 2012 4:41 am

Re: Slow performance, any ideas?

Post by emptybox »

The code itself is just the "hello world" example. Nothing special.

Code: Select all

  1 function love.draw()
  2     love.graphics.print( "hello world!", 400, 400  )
  3 end
But when the window shows up, my system just suddenly become very slow.
User avatar
pk
Citizen
Posts: 67
Joined: Wed Dec 14, 2011 2:13 am
Location: Texas, United States
Contact:

Re: Slow performance, any ideas?

Post by pk »

Your computer is very fast, with a dedicated graphics card to boot. Something must be going horribly wrong with your X11 setup or ATI drivers.

There is an official linux binary driver for ATI video cards called fglrx. You might have better luck with it.
ALL CREATURE WILL DIE AND ALL THE THINGS WILL BE BROKEN. THAT'S THE LAW OF SAMURAI.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Slow performance, any ideas?

Post by T-Bone »

This happens on my computer as well. Try disabling vsync. The best way to do this is to include a file called "conf.lua" with the following.

Code: Select all

function love.conf(t)
	t.screen.vsync = false
end
This is common on Linux setups. You can't simply assume that a computer has a good vsync implementation, at least not if it runs Linux.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Slow performance, any ideas?

Post by bartbes »

T-Bone wrote: This is common on Linux setups. You can't simply assume that a computer has a good vsync implementation, at least not if it runs Linux.
That is a lie. This is most definitely the driver's fault, and some have been reported to do the same on windows, for instance.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Slow performance, any ideas?

Post by T-Bone »

bartbes wrote:
T-Bone wrote: This is common on Linux setups. You can't simply assume that a computer has a good vsync implementation, at least not if it runs Linux.
That is a lie. This is most definitely the driver's fault, and some have been reported to do the same on windows, for instance.
What I said and what you said do not contradict eachother. It is "common" on Linux setups, meaning that I've seen it several times on several computers and drivers. That doesn't mean it's not the driver's fault. Linux isn't excactly known for having great graphics card drivers.

You can't assume that a random computer has working vsync. That is a fact, no matter what the reason is. Most computers may have it, but it's common enough for it to be quite easy to find one without it.

If it can happen on Windows too then it's all the more of a reason not to assume that a random computer has properly working vsync.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Slow performance, any ideas?

Post by bartbes »

And I'm saying it isn't as common as you might think, and disapproving of the implication that it is more common on linux than on other operating systems. (If you claim you didn't mean this, why explicitly mention linux in the first place?)
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Slow performance, any ideas?

Post by T-Bone »

bartbes wrote:And I'm saying it isn't as common as you might think, and disapproving of the implication that it is more common on linux than on other operating systems. (If you claim you didn't mean this, why explicitly mention linux in the first place?)
I said "at least not if it runs Linux". I mention Linux because it is there that I have seen it (several times). I have never heard of it appearing on Windows or any other OS but I guess it can. I never said that it was more common on Linux than on other OSes, but it seems to be based at least on my personal experience.

Perhaps I've formulated myself badly? All I mean to say is that I've seen bad vsync on enough Linux computers to claim that it's common.

EDIT: Perhaps I should have said "it's a common issue on Linux", perhaps I made it sound like it was "normal" in the sense that there's nothing wrong with it?
Last edited by T-Bone on Thu Mar 08, 2012 10:22 am, edited 1 time in total.
emptybox
Prole
Posts: 3
Joined: Mon Mar 05, 2012 4:41 am

Re: Slow performance, any ideas?

Post by emptybox »

T-Bone wrote:This happens on my computer as well. Try disabling vsync. The best way to do this is to include a file called "conf.lua" with the following.

Code: Select all

function love.conf(t)
	t.screen.vsync = false
end
This is common on Linux setups. You can't simply assume that a computer has a good vsync implementation, at least not if it runs Linux.
Thanks man, just tried and this time my program runs super smooth!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests