0

Which way of testing a value is the least processor intensive?

Hi folks, Here are two pipes, each using a different way of testing a user input value. Which is the least processing intensive?

If the value is Y I want processing to flow down one branch of a split, if it is N I want processing to flow down the other branch. If it is any other value then processing should flow down neither branch. The pipes are: http://pipes.yahoo.com/pipes/pipe.info?_id=cc0cd86c3c7b83b622e84bb57e696851 and http://pipes.yahoo.com/pipes/pipe.info?_id=ad96f2438d09290d8e43d4f81432d277

The real pipe is much more sophisticated and the above represents only a small snippet of the full pipe. I'm trying to reduce the time taken to process as much as possible, while still allowing for a Y/N input.

Thanks in advance :) ~~Mark

by
12 Replies
  • Hello,

    I like what I see there ;)

    Am I allowed to say: neither of those solutions? look at: http://pipes.yahoo.com/luneart/2ba9a967ff3b585b3c3ec048784c8dfc

    It would be best to not have your conditionals as different workflows be as small operations on values I think. If you really NEED this kind of structure, I think tokenize and create rss are equivalent, and once again I'd do it differently: a string builder inside a loop module, as it does no extra operation.

    hoping you can use this post to get away from that dreadful 30s limit :)

    1
  • Hi Lolo - thanks for the quick response - I'm looking at your suggestion now :)

    0
  • Hi again Lolo,

    I need to to do a good couple of handfuls of operations down the left hand flow of the split and only one or two down the right hand side (the test mode I'm checking for is to avoid all those operations). I've scratched my brain but can't see how a string builder inside a loop would help...

    Are you saying that splitting into two flows adds significantly to the time taken to process?

    The reason I'm looking into this is that the full pipe I'm using has been working just fine with IFTTT since November but since Feb 26th it has only been working very intermittently, like less than 1% of the time.

    I'm trying to make sure that the problem doesn't lie with pipes by trimming as much as possible.

    In debug mode it's taking less than a second to process but I don't know how long when it's used for real. When I 'get as rss' and paste into Firefox, it's pretty instantaneous but I don't know if that applies to IFTTT when it fetches the feed. Clutching at straws ;)

    0
  • pipes computations times are steady, you could have trouble if you were already close to that 30 sec limit, but that's not the case. could you post the entire pipe so I'd have a look at it? and the ifttt receipe, as well: I'm also a user of ifttt so maybe I could help you even though I'm a small time user there ;)

    1
  • Hi Lolo - I got this rather worrying reply from IFTTT:

    Feeds generated by Yahoo! Pipes can sometimes be inconsistent or slow to respond, often throttling automated traffic. Unfortunately there’s not much we can do from our end to help that particular situation.

    (my bold)

    I have a handful of different pipes used by IFTTT, some are relatively simple and some much more sophisticated. It seems to be mainly but not only the sophisticated ones that aren't working - either giving Initialization Timeouts or General Trigger errors, although some of the sophisticated ones are still working.

    Everything was fine up until 26th Feb when nearly all my recipes suddenly started to have problems. I didn't add any more recipes in the run-up to that date or do anything else with IFTTT so I don't think it's anything I've done. Because of this I don't think throttling back has been triggered.

    Does Y!P do as IFTTT suggest above?

    Thanks for any help with this Lolo as it's awkward being stuck in the middle between two service providers :(

    If you need to, you can email me privately on highton.ridley at gmail.com. If you do, I'll send on the full pipe, which I don't want to show publicly.

    Thanks again for any help :)

    0
  • I've just been re-reading http://pipes.yahoo.com/pipes/docs?doc=troubleshooting#q15

    and wonder if this might be the cause:

    What are the usage limits for Pipes?

    ...

    200 runs (of any Pipe) from an IP in 10 minutes

    0
  • I'm just a user like you, so I can't really say; however that would explain some strange behaviours with my rss client that I thought were caused by the later. About the figures in the documentation, I'm not sure they can be trusted either, as clearly stuff has changed since its redaction.

    One more remark/wondering: how can pipes and ifttt work together? Clearly it seems you have no major trouble other than the current one, but here is what I used to think:

    • pipes produces the feed only when queried
    • ifttt expects push notifications (instead of a constant querying of the feed)

    I suspect I was wrong about the latter, can you confirm?

    About that hard date of the 26th Feb, maybe yahoo re-allocated some of their pipes servers to something else, a second step in stopping this service (first one being not supporting it much anymore (as per the state of the documentation and modules disappearing (translate, search, incomplete XPath Fetch Page)). That would mean switching service and provider :s. maybe to dlvr.it as mentioned by another user last month (but afaik it's limited to text search & replace: http://blog.dlvr.it/2010/06/find-and-replace-tweak-your-feed-item-text-before-posting/)

    0
  • Hey Lolo,

    According to the docs, as long as requesters get the cached version, that won't count towards the number of runs.

    Yes, Pipes produce the feed only when queried; but IFTTT polls the feed every 15 mins or so, i.e. they're not expecting a push.

    Whenever I paste the pipe url into Firefox, I get the expected results. Right now, I'm trying feedburner - burning the Y!P url. I've got to wait until after 12 midnight (GMT) to see if it works that way.

    I had a look at dlvr.it but I need regex; simple search and replace won't cut it for me.

    I'm seriously thinking of seeing if I can get my pipes compiled (php?) so I don't depend on their service. I've searched online but the only efforts I've seen for compiling pipes are way out of date and only support some of the modules. Any ideas?

    Would be happy to get an email from you.

    Cheers ~~Mark

    0
  • the trouble is ifttt. I guess you could do your feed operations in php or javascript (that would be most suited I think), but how would ifttt call it? And for the pipe compiling, you can forget it: with pipes having closed sources and being rather unsung/off trail, nobody were able/bothered trying to export the instruction, that's pretty much sure.

    0
  • Thanks Lolo - I'm clutching at straws to find a way around the issue if it proves to be Pipes at fault. If I could get it converted into php, I would then have an RSS Feed as output to use as a trigger with IFTTT or other similar service.

    0
  • Lolo, I'd forgotten that I've got a dlvr.it a/c feeding a tumblr blog, driven by the same pipe - and it's working just fine: ~~~ http://fashionistabags.tumblr.com ~~~

    I'm now convinced the problem lies with IFTTT! ~~Mark

    0
  • that's good news, but I wouldn't be that sure: dlvr.it are probably used to handle pipes and they might have a special retry method in its case...

    0

Recent Posts

in Pipes