Livecode still way too slow....

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

tjframe
Posts: 13
Joined: Wed Dec 05, 2007 8:52 am

Livecode still way too slow....

Post by tjframe » Sun Jan 01, 2017 10:41 am

Hi all,

I recently returned to using Livecode (for Windows) for some personal projects, after taking a few years off.

To my dismay, the huge speed slowdown (particularity for graphics manipulations) vs older versions is still present.

The big cut-off point is 6.5 to 6.5.1 and above. I'm guessing the dpi scaling code really added a lot of overhead, because informal speed tests between 6.5 and anything newer show a 200% to 500% difference.

For example, a simple stack i whipped up wherein the points of several hundreds grc lines are adjusted on-the-fly to match a dragged button registers as 0 to 1 ticks with 6.5, on version 9 it's 4 to 5 ticks.

For a lot of types of stacks I suppose it wouldn't matter, but my stuff is particularity graphics heavy with thousands of images being tweaked, moved etc. This speed difference is just way too great to ignore.

I would love to use the new versions naturally, but I don't see much about this issue in the Roadmap page. Will it ever be addressed? I'd be fine with just entirely disabling screen scaling altogether if my stuff ran twice as fast!

- TJ

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1970
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: Livecode still way too slow....

Post by richmond62 » Sun Jan 01, 2017 3:15 pm

Interestingly enough, I authored a lot of fairly simplistic stacks for EFL (English as a Foreign Language) about 10 years ago using LiveCode [Runtime Revolution] 2.2.1
( https://www.linux.com/news/revolution-e ... suse-users )
which went very fast on 32-bit Linux.

Recently I changed many of the computers in my EFL school, and ended up with a lot of machines running 64-bit Linux.

I went back to my stacks and built a series of standalones with LiveCode 7.1.4 both for 32-bit and 64-bit Linux;
when I deployed them they worked at the same speed as the previous builds.

I don't think you should be criticising the speed of the engines themselves; what are probably running more slowly are the
stacks that you have authored with all the new capabilities which LiveCode has acquired since version 6.0.

tjframe
Posts: 13
Joined: Wed Dec 05, 2007 8:52 am

Re: Livecode still way too slow....

Post by tjframe » Sun Jan 01, 2017 11:41 pm

I don't think you should be criticising the speed of the engines themselves; what are probably running more slowly are the
stacks that you have authored with all the new capabilities which LiveCode has acquired since version 6.0.
Setting the points of a grc are not "new capabilities"

I'm talking about a ridiculously simple script like:

put the number of grcs into gNum
put 1 into cCounter
repeat gNum
set the points of grc cCounter to 0,0,500,500
add 1 to cCounter
end repeat

This runs 2-4 times faster on 6.5 vs 6.51 and above for me on a Windows system

Here is another silly and simple speed test. It doesn't do anything other than show off how much slower the DPI scaling code is, but setting the icon of thousands of buttons is exactly what I'm doing in my current project.

on Icontest
put the ticks into tNum
repeat 2000
set the icon of btn 2 to 210002
set the icon of btn 2 to 0
end repeat
put the ticks - tNum
end Icontest

I have both versions open and run this test : on 6.5 it runs at 121 ticks, on version 9 its running at 232 ticks. Locking the screen yields 7 ticks vs 21 ticks. It actually gets slower proportionally to the earlier versions when locking the screen. twice as slow becomes 3 times as slow when locking the screen.

If there is some new way to make this faster, I'm all ears.

I love using Livecode, and if its never going to happen that's ok I guess, it just means I wont be able to use the new versions, since my stuff is heavily graphics based and I need every ounce of speed I can get without going to externals

rinzwind
Posts: 131
Joined: Tue May 01, 2012 10:44 am

Re: Livecode still way too slow....

Post by rinzwind » Wed Feb 08, 2017 6:20 pm

It is too slow indeed. The language doesnt get any enhancements too. What they could add? Just look at the SenseTalk dev manual... byref vars, dot notation, dynamic property lists, assign multiple values at once, sql as a language construct, simple things as iso date format, date calculations, ...

O and the datagrid is so slow its useless. Bug has been open for half a year. Also the code of that control hmmm and not too friendly. Seems they bought it and never reviewed it. I do respect the work that the one original developer put into it though. But really, LC needs something else.

Oke enough rambling for today. Reorientate LC team.. those controls all look the same like many years ago. Not improved in any way. One would expect a password field by now, and some kind of interactive input mask. All set through properties. And native looking mobile controls... that work.

Ps the link to SenseTalk good organized dev doc: http://docs.testplant.com/PDFs/SenseTal ... erence.pdf

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5466
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Livecode still way too slow....

Post by FourthWorld » Wed Feb 08, 2017 7:39 pm

Hello tjframe.

I'm unable to reproduce those results.

Running the attached stack in v9.0dp4 under Ubuntu 14.04 on an Intel Haswell G3220@3.0 GHz I get:

Icon test:
v6.7: 59 ticks
v9.0: 58 ticks

points test (on 120 graphics):
v6.7: 0.941522 seconds
v9.0: 1.195972 seconds

In only the points test was there a difference beyond normal system fluctuations, and even then it wasn't a multiple but a relatively small percentage.

For a better representation of real-world use, I added "lock screen" before each test (if your production apps aren't including "lock screen" before doing multiple actions that will trigger redraw it's highly recommended for avoiding redundant rendering):

Icon test:
v6.7: 4 ticks
v9.0: 4 ticks

points test (on 120 graphics):
v6.7: 0.000433 seconds
v9.0: 0.000513 seconds

Windows rendering has undergone some fairly recent changes to account for older API use which has caused problems in Windows 10. Perhaps using the new rendering APIs from Microsoft may be contributing to the slowdown you're seeing. Which version of Windows are you running?
Attachments
render_speed_test.livecode.zip
speed tests
(1.2 KiB) Downloaded 53 times
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5466
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Livecode still way too slow....

Post by FourthWorld » Wed Feb 08, 2017 7:57 pm

rinzwind wrote:The language doesnt get any enhancements too.
You'll find new language features listed in the "Engine Changes" section of the Release Notes for each version, available here:
http://downloads.livecode.com/livecode/

I haven't taken the time to add them all up, but I believe it's safe to say that in the many releases between v7.0 and v9.0 LiveCode has seen at least several dozen new features (quite possibly more than a hundred, but I'm being conservative with my estimates here).

This interview with Kevin Miller and Mark Waddingham includes a section in the middle with a partial list of new features added in v7 and v8 (it predates later v8 features and v9, but may be a useful summary just the same):
https://livecode.com/trevor-devore-inte ... -livecode/

Eggplant's also a very good language, and with its focus on test automation it's carved out a very nice niche for itself. But I don't believe they've returned to making a general-purpose GUI app development toolkit as the product used to be, so it's difficult to compare it with LiveCode directly as each has a very different focus.

But of course there are hundreds of great languages, and LiveCode is just one of them. No single programming language is best at everything, which is why we have so many to choose from, with new ones almost every year. Use whatever works for you and the projects you do.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: Livecode still way too slow....

Post by Dixie » Wed Feb 08, 2017 9:36 pm

I am getting more or less the same results as Richard... LC 8.10, MacBook... using lockScreen makes all the difference and I note as did Richard that you are not locking the screen...

dixie

andrewferguson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 179
Joined: Wed Apr 10, 2013 5:09 pm

Re: Livecode still way too slow....

Post by andrewferguson » Thu Feb 09, 2017 3:50 pm

I would also suspect that the reason why the datagrid is not a priority for the team is because it is likely going to be superseded by widgets in a short while.
And please also remember that LiveCode is open source... anyone is able to add new features and fix bugs!
(Note: I am not implying that by making LiveCode open source you should be expected to fix everything yourself - rather that now their is the additional possibility to rectify your own personal issues in a shorter time frame than could ever be managed by the LiveCode team).

rinzwind
Posts: 131
Joined: Tue May 01, 2012 10:44 am

Re: Livecode still way too slow....

Post by rinzwind » Fri Feb 10, 2017 12:17 pm

Maybe interesting to look into... B4X . Have a promotion going on too for few days (40% off). www.b4x.com
Desktop is free (uses Java in a relatively Good Way), iOS and Android are payed. Visual Basic 6 users will recognise the language which helps feel @home ;) Just to have some options if your stuck... Anyways... Xojo has its problems too, a framework that apparently still needs more love, an IDE which is sluggish, took on too much work for a small company. B4x is also a small company (1 guy? Going on for years already (going back to pocket pc) and seems he knows what hes doing), but its all builds upon existing frameworks (Java) and tools so he doesnt have to reinvent everything. For game dev: look at Lua with its frameworks (Corona or Love). Many REAL games available on appstore build with that.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5466
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Livecode still way too slow....

Post by FourthWorld » Fri Feb 10, 2017 6:53 pm

rinzwind wrote:Maybe interesting to look into... B4X .
Have you had a chance to do comparative benchmarks for either of the two tasks above in B4X vs LC?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

tjframe
Posts: 13
Joined: Wed Dec 05, 2007 8:52 am

Re: Livecode still way too slow....

Post by tjframe » Tue Feb 14, 2017 10:26 am

Richard,

Alas, my own results on Windows remain disappointing. Here is your stack you made from my script running on the same machine side-by side.

Image

Oh well.. nothing new I guess for the Windows side.

Never heard of B4X before. I'm downloading it now and taking a look. Looks pretty interesting. My dream rapid dev environment would be a truly object oriented, dot notation supporting, hybrid environment with a robust IDE and widget toolset, flexible, and transparent access to c modules and internals access. Throw in huge libraries of common tasks and time saving elements such as file saving,client/server stuff/graphics (high and low level). multimedia/internet/database widgets etc.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5466
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Livecode still way too slow....

Post by FourthWorld » Tue Feb 14, 2017 4:23 pm

The screen shot shows the system profile (nice CPU) but didn't include benchmark output. Was it cropped?

Do you see the same performance issues on versions of Windows Microsoft still supports? LC still officially supports Win 7, but since MS EOL'd it more than a year ago I'm not sure how long they'll be able to maintain that.

Either way, as I noted earlier LC's Windows rendering has undergone some fairly recent changes to account for older API use which has caused problems in Windows 10. If you have a recipe for a performance issue that seems below par, you may want to submit a bug report on that:
http://quality.livecode.com/
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

tjframe
Posts: 13
Joined: Wed Dec 05, 2007 8:52 am

Re: Livecode still way too slow....

Post by tjframe » Wed Feb 15, 2017 7:04 am

>>>> but didn't include benchmark output. Was it cropped?

Yea not sure what you are seeing on your end, but the image I posted has the benchmark output of your program running side by side under Livecode 9.0 and 6.5. If you can't see the full image, the results were as follows:

v9 - "Icons" button took 193 ticks, the "Line" button took 1.405 seconds
v6.5 "Icons" button took 94 ticks, the "Line" button took 0.232 seconds

Which is keeping with my initial results. I have not tried it under another version of windows, although I might take the stacks into work and test them on a work machine that is running Windows 10.

I will look into submitting a bug report, thx.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5466
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Livecode still way too slow....

Post by FourthWorld » Wed Feb 15, 2017 8:33 pm

tjframe wrote:I will look into submitting a bug report, thx.
Thanks. Please note the bug report number here after you submit it.

Have you had a chance to test the relative performance with lockscreen set to true?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

rinzwind
Posts: 131
Joined: Tue May 01, 2012 10:44 am

Re: Livecode still way too slow....

Post by rinzwind » Thu Feb 16, 2017 3:51 pm

I for one are glad that I have a perpetual license of the last v5, v5.5.5 ;) The IDE is much faster than later revisions, resulting apps too. And smaller. Which also makes clear that 'for the end-user' not much changed since... apart from unicode (which is a big thing in itself ofcourse but still...). Also don't agree with the LCB path taken. I think LC script itself should be improved to handle that task as well instead of creating a new language (without IDE too...).

Post Reply

Return to “Feature Requests”