Re: Push Card
I still maintain a HC server stack, accessible by clients over a network, of many thousands of cards. Access to any of them using the "find" command is virtually instantaneous. It is LC that starts to visibly slow after about 2000 cards. Someone like Richard or Jacque may know a bit about why that is, but I assume that LC simply carries much more baggage. It must be remembered that HC was designed to run on a 1MB Mac. Color was out of the question, and the routines for finding stuff was considered revolutionary and was carefully guarded. Craig -Original Message- From: Peter Bogdanoff via use-livecode To: How to use LiveCode Cc: Peter Bogdanoff Sent: Tue, Oct 22, 2019 2:40 pm Subject: Re: Push Card Hi Andrew, I think the problem is having very many cards—in the thousands, each with text, images, etc.—that I experience slowdowns. The stack taking a long time to open, save, go to cards, and just wanting to freeze for awhile. When I changed my method to just a few cards with the text and the data used to display it stored in arrays, page loading is lighting fast. Creating fields and buttons, formatting them and filling with text on the fly, then deleting them when I load the next “page" is really fast. I put images on a web server that I pre-download to memory so they display quickly when needed is also part of the plan. These images could otherwise be stored as files on disk, or in a LC stack. Images in a LC stack can be referenced by using a button and setting its icon to ID of the stored image. Using these kinds of techniques I went from a 600 MB collection of stacks down 60 MB— 1/3 text and other data, 1/3 images used as thumbnail images embedded in text fields, and 1/3 the LC engine runtime, and I moved several hundred MB of images to the server. LC is really fast with small stacks, and it’s really convenient just to lay out bunches of cards with stuff, but after awhile, LC just isn’t fast anymore. Peter Bogdanoff artsinteractiveinc.com > On Oct 22, 2019, at 2:01 PM, Andrew Bell via use-livecode > wrote: > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
Hi Andrew, I think the problem is having very many cards—in the thousands, each with text, images, etc.—that I experience slowdowns. The stack taking a long time to open, save, go to cards, and just wanting to freeze for awhile. When I changed my method to just a few cards with the text and the data used to display it stored in arrays, page loading is lighting fast. Creating fields and buttons, formatting them and filling with text on the fly, then deleting them when I load the next “page" is really fast. I put images on a web server that I pre-download to memory so they display quickly when needed is also part of the plan. These images could otherwise be stored as files on disk, or in a LC stack. Images in a LC stack can be referenced by using a button and setting its icon to ID of the stored image. Using these kinds of techniques I went from a 600 MB collection of stacks down 60 MB— 1/3 text and other data, 1/3 images used as thumbnail images embedded in text fields, and 1/3 the LC engine runtime, and I moved several hundred MB of images to the server. LC is really fast with small stacks, and it’s really convenient just to lay out bunches of cards with stuff, but after awhile, LC just isn’t fast anymore. Peter Bogdanoff artsinteractiveinc.com > On Oct 22, 2019, at 2:01 PM, Andrew Bell via use-livecode > wrote: > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
On Oct 22, 2019, at 8:49 AM, Bob Sneidar via use-livecode wrote: > > I have tried push and pop before but you really have to keep track of the > pushed cards or you end up somewhere unexpected. Every time I’ve tried to use push/pop, it’s been more trouble than it was worth—with the lone exception being a three line sequence of push, do something that absolutely had to use the current card, pop. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
> On Oct 22, 2019, at 11:01 , Andrew Bell via use-livecode > wrote: > > I learned HyperCard in K-12 during the '90s and moved to LiveCode a couple > years ago. My coding efficiency and strategies have developed considerably > over my past couple projects. I don't make a new card for everything, but > easily end up with a dozen cards in a stack for most projects. > > Are you saying that LC is better suited to just throw everything onto 1 card > then turn on&off the visibility of groups/etc.? > > --Andrew Bell Not at all. Hypercard was designed so that people with no database knowedge whatsoever could nevertheless store and search for information quickly and easily by first storing information on "cards", and then having a very robust full text indexing engine (quite advanced for it's time too) so that finding that information would be bearably fast. The trouble came in when people began to discover that at around 2000 cards, things began to slow down, and stacks began to experience corruption. I think they eventually discovered that Hypercard needed time to do some housecleaning, and rapid continuous writes kept it from doing that. LC is optimized (not sure that's the right term for it) to use cards like forms, and then populate those "forms" with data from other sources like databases, arrays, files etc. I have 15 stacks in my current project, and all but the main stack only have one card. I could have simply created 15 cards, but then the size of each card is different, and what each stack does is anything from slightly different to radically different, so having multiple stacks helps me keep all that organized. Also, each stack (I call them modules) can be open simultaneously with others, like the customer stack and the devices stack for example, which I could not do with a single stack and multiple cards. It sounds tempting at first to have groups that get shown and hidden on a single card, but keeping these groups organized, selecting groups under other groups, copying and pasting between groups etc. will quickly cure you of that approach. Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
I don’t think 12 cards will be an issue. The problem is that cards are a linked list in memory so random access to hundreds of cards can be slow. Next card is always fast (would have to look to see if it is a double link for the same to be true of previous). Thanks, Brian On Oct 22, 2019, 2:02 PM -0400, Andrew Bell via use-livecode , wrote: > I learned HyperCard in K-12 during the '90s and moved to LiveCode a > couple years ago. My coding efficiency and strategies have developed > considerably over my past couple projects. I don't make a new card for > everything, but easily end up with a dozen cards in a stack for most > projects. > > Are you saying that LC is better suited to just throw everything onto > 1 card then turn on&off the visibility of groups/etc.? > > --Andrew Bell > > > > Subject: Re: Push Card > > Message-ID: <2d259a07-7c34-4337-9dbb-24f2ff8e6...@iotecdigital.com> > > Content-Type: text/plain; charset="us-ascii" > > > > I have tried push and pop before but you really have to keep track > > of the pushed cards or you end up somewhere unexpected. I'm still > > not sure what the utility of having lots and lots of cards is, if > > that is what you are doing, especially considering that the LC > > engine is not optimized to use that paradigm. > > > > Bob S > > > > > > > On Oct 22, 2019, at 08:39 , JB via use-livecode > > > wrote: > > > > > > Thank you for the info! > > > > > > I think I am going to rewrite the code to work > > > better and eliminate using push card for this > > > instance. > > > > > > JB > > > > > > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
I learned HyperCard in K-12 during the '90s and moved to LiveCode a couple years ago. My coding efficiency and strategies have developed considerably over my past couple projects. I don't make a new card for everything, but easily end up with a dozen cards in a stack for most projects. Are you saying that LC is better suited to just throw everything onto 1 card then turn on&off the visibility of groups/etc.? --Andrew Bell Subject: Re: Push Card Message-ID: <2d259a07-7c34-4337-9dbb-24f2ff8e6...@iotecdigital.com> Content-Type: text/plain; charset="us-ascii" I have tried push and pop before but you really have to keep track of the pushed cards or you end up somewhere unexpected. I'm still not sure what the utility of having lots and lots of cards is, if that is what you are doing, especially considering that the LC engine is not optimized to use that paradigm. Bob S On Oct 22, 2019, at 08:39 , JB via use-livecode wrote: Thank you for the info! I think I am going to rewrite the code to work better and eliminate using push card for this instance. JB ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
That is nice to know! Actually in my case I went down a path I never should have anyway and writing the code so it works better instead of using recent or push is the way to go. thanks, JB > On Oct 22, 2019, at 10:40 AM, dunbarx--- via use-livecode > wrote: > > This goes back to 1987. The HC team assumed that most people would navigate > like crazy, think rolodex, and being able to retrace ones history would be a > very useful tool. > > There should be a "clear recent" command, so that the piles of cards in that > history can be eliminated. But LC has things that make this simple, the > "recentCards" and "recentNames" properties. > > Craig > > > -Original Message- > From: JB via use-livecode > To: How to use LiveCode > Cc: JB > Sent: Tue, Oct 22, 2019 12:28 pm > Subject: Re: Push Card > > Do you mean to also keep a track of my own card id’s and > then eliminate the ones I do not want in the list? > > That would probably work but I think I will just write the > code differently for this program. It is not a big problem > but the ending up where I did not expect just needs to > be fixed and is not going to be very difficult. > > thanks for the help! > > JB > >> On Oct 22, 2019, at 9:14 AM, Bob Sneidar via use-livecode >> wrote: >> >> One way to do this is to have a single function do the pushing and popping >> so it always knows where it is. >> >> Bob S >> >> >>> On Oct 22, 2019, at 09:04 , JB via use-livecode >>> wrote: >>> >>> I don’t have very many cards but eventually I end >>> up somewhere I didn’t expect and if I cleared the >>> list it would take care of the problem. But if I take >>> the time to write the code better I can solve the >>> problem without using push and pop. >>> >>> JB >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
This goes back to 1987. The HC team assumed that most people would navigate like crazy, think rolodex, and being able to retrace ones history would be a very useful tool. There should be a "clear recent" command, so that the piles of cards in that history can be eliminated. But LC has things that make this simple, the "recentCards" and "recentNames" properties. Craig -Original Message- From: JB via use-livecode To: How to use LiveCode Cc: JB Sent: Tue, Oct 22, 2019 12:28 pm Subject: Re: Push Card Do you mean to also keep a track of my own card id’s and then eliminate the ones I do not want in the list? That would probably work but I think I will just write the code differently for this program. It is not a big problem but the ending up where I did not expect just needs to be fixed and is not going to be very difficult. thanks for the help! JB > On Oct 22, 2019, at 9:14 AM, Bob Sneidar via use-livecode > wrote: > > One way to do this is to have a single function do the pushing and popping so > it always knows where it is. > > Bob S > > >> On Oct 22, 2019, at 09:04 , JB via use-livecode >> wrote: >> >> I don’t have very many cards but eventually I end >> up somewhere I didn’t expect and if I cleared the >> list it would take care of the problem. But if I take >> the time to write the code better I can solve the >> problem without using push and pop. >> >> JB > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
Do you mean to also keep a track of my own card id’s and then eliminate the ones I do not want in the list? That would probably work but I think I will just write the code differently for this program. It is not a big problem but the ending up where I did not expect just needs to be fixed and is not going to be very difficult. thanks for the help! JB > On Oct 22, 2019, at 9:14 AM, Bob Sneidar via use-livecode > wrote: > > One way to do this is to have a single function do the pushing and popping so > it always knows where it is. > > Bob S > > >> On Oct 22, 2019, at 09:04 , JB via use-livecode >> wrote: >> >> I don’t have very many cards but eventually I end >> up somewhere I didn’t expect and if I cleared the >> list it would take care of the problem. But if I take >> the time to write the code better I can solve the >> problem without using push and pop. >> >> JB > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
One way to do this is to have a single function do the pushing and popping so it always knows where it is. Bob S > On Oct 22, 2019, at 09:04 , JB via use-livecode > wrote: > > I don’t have very many cards but eventually I end > up somewhere I didn’t expect and if I cleared the > list it would take care of the problem. But if I take > the time to write the code better I can solve the > problem without using push and pop. > > JB ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
I don’t have very many cards but eventually I end up somewhere I didn’t expect and if I cleared the list it would take care of the problem. But if I take the time to write the code better I can solve the problem without using push and pop. JB > On Oct 22, 2019, at 8:49 AM, Bob Sneidar via use-livecode > wrote: > > I have tried push and pop before but you really have to keep track of the > pushed cards or you end up somewhere unexpected. I'm still not sure what the > utility of having lots and lots of cards is, if that is what you are doing, > especially considering that the LC engine is not optimized to use that > paradigm. > > Bob S > > >> On Oct 22, 2019, at 08:39 , JB via use-livecode >> wrote: >> >> Thank you for the info! >> >> I think I am going to rewrite the code to work >> better and eliminate using push card for this >> instance. >> >> JB > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
I have tried push and pop before but you really have to keep track of the pushed cards or you end up somewhere unexpected. I'm still not sure what the utility of having lots and lots of cards is, if that is what you are doing, especially considering that the LC engine is not optimized to use that paradigm. Bob S > On Oct 22, 2019, at 08:39 , JB via use-livecode > wrote: > > Thank you for the info! > > I think I am going to rewrite the code to work > better and eliminate using push card for this > instance. > > JB ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
Thank you for the info! I think I am going to rewrite the code to work better and eliminate using push card for this instance. JB > On Oct 22, 2019, at 3:44 AM, hh via use-livecode > wrote: > >> JB wrote: >> The list of pushed cards is cleared when you quit the application. >> Is there a way to clear the list without quitting the application? > > You could try > > on mouseUp > put "home.livecodescript""e into tA > repeat >pop card into tB >if tB ends with tA then exit repeat > end repeat > end mouseUp > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Push Card
> JB wrote: > The list of pushed cards is cleared when you quit the application. > Is there a way to clear the list without quitting the application? You could try on mouseUp put "home.livecodescript""e into tA repeat pop card into tB if tB ends with tA then exit repeat end repeat end mouseUp ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Push Card
The list of pushed cards is cleared when you quit the application. Is there a way to clear the list without quitting the application? JB ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode