I suggest you ...

add complexity option (for developer) to conditions

Let plug-in developer to tell locale how complex his plug-in is.
Thanks to that locale can decide to not check more complex plug-in if the other less complex isn't active.
E.g. when "Variables Plug-in" (which I think is the simplest plug-in) isn't active, don't check the bluetooth or wifi condition.

3 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Jacek SzafarkiewiczJacek Szafarkiewicz shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    declined  ·  CarterAdminCarter (Admin, two forty four a.m.) responded  · 

    This is an interesting idea that we’ve considered in the past but ultimately found that it won’t achieve the desired effect of improving battery life.

    Instead of ranking conditions based on battery usage, Locale ranks them based on schedule. This is far simpler and more efficient.

    Plug-ins shouldn’t be doing anything that consumes a lot of battery power anyway. Plug-ins are supposed to be detecting asynchronous state changes (or pre-scheduled state changes), rather than relying on polling. For example, connecting a Dock is an asynchronous event and a Calendar condition is a pre-scheduled change. Neither of these require polling, so neither of these should consume any battery power whatsoever. They happen once and they are done. So if plug-ins are implemented correctly, there’s no need to worry about battery usage.

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • CarterAdminCarter (Admin, two forty four a.m.) commented  ·   ·  Flag as inappropriate

        Has the plug-in been written? Are there battery usage measurements that indicate a problem? If we don't have a baseline, then we don't know if this "optimization" would even help us.

        For example, a big drain on the battery is the processor, which uses battery when the device is awake. If the Location condition has already woken up the device to perform a Wi-Fi scan, the additional cost of doing a Bluetooth scan might actually be very low.

      • Jacek SzafarkiewiczJacek Szafarkiewicz commented  ·   ·  Flag as inappropriate

        In this case you are right but I want to write a plug-in that detects bluetooth device in range.
        And it will be checking if phone can query the device.
        I thought it should be determined by some other condition e.g. location, so it won't query multiple devices.

      • Jacek SzafarkiewiczJacek Szafarkiewicz commented  ·   ·  Flag as inappropriate

        This can be also useful for determining position - when "cell id" (with accuracy e.g. 2000 m) tells I am out of any condition (e.g. in other city) it don't have to check WiFi.

      Feedback and Knowledge Base