Library 4.8 speed verses all after that

I keep waiting for this to be fixed and it appears that it is not going to be.
Ever since Library 4.8 the counter in my application falls behind. It’s on a 1-second interval.
Just tried the new Library 5.3 and still the same.
I have created a video of my app that has been compiled with Libabry 4.8 first and you will notice that the
auger status widget clicks right along at 1-second intervals just fine.
2 nd part of the video was compiled with the latest Libary 5.3 and you will notice the auger status falls behind as much as 5 seconds.
Whatever was changed in Library 4.10 and above all have this problem.
It will even show up on the simplest app with a single widget displaying a clock at 1 second interval.
I know some work was done in the library to try and prevent flooding. I think this a what is causing this delay.

Here is the video.

I see a blank spot :wink:

In what way? 0.1 second, 2 second, 5 second delay?

Possibly… but also doubtful. I have many strange projects… some that push the limits on timing, but they still keep the correct timing… although my one ESP32 project does get a bit strange at “times”… but that is more an ESP32 thing, not Blynk.

The solution will most likely be to tailor your (mystery) code for better efficiency so that the anti-flooding doesn’t need to affect timing.

1 Like

hm …

05528

If you want your issue to be addressed, please provide the simplest example that clearly displays the problem, and steps to reproduce. Thanks.

Actually library 5.3 is better than 5.2 in this case. So it appears to be getting better.
Create a new project with 1 value display widget. Assign V10 as input.
add a real time clock to it. That is all that is needed on this test.
Create a new sketch in Arduino and paste the following code.

Compile using Blynk Library 4.8.
Run the app and watch the seconds tick . occationally you will see a 1 or 2 second lag time. Not very often with 4.8.

When ready recompile useing 5.3 and run app. You will see more frequent lag times occationally up to 3 seconds.

It is really pronounced when you are running a large program with more timers.

 
#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <ArduinoOTA.h>
#include <SimpleTimer.h> // here is the SimpleTimer library
#include <BlynkSimpleEsp8266.h>
#include <TimeLib.h>
#include <WidgetRTC.h>


 char auth[] = "auth";  //timer test library
 
    #define D0 16
    #define D1 5
    #define D2 4
    #define D3 0  
//    #define D4 2    
    #define D5 14
    #define D6 12
    #define D7 13
    #define D8 15      
    #define D9 3
    #define D10 1
    #define pir D6
    
#define BLYNK_RED       "#D3435C"  
#define BLYNK_YELLOW    "#ED9D00" 
#define BLYNK_GREEN     "#23C48E" 
#define BLYNK_BLUE      "#04C0F8"
#define BLYNK_DARK_BLUE "#5F7CD8"
#define BLYNK_BLACK     "#000000"
#define BLYNK_WHITE     "#FFFFFF"
#define BLYNK_MAROON    "#A12345" 
#define BLYNK_PINK      "#FFB3B3"
#define BLYNK_OLIVE     "#808000"
    
  SimpleTimer timer;
  WidgetRTC rtc;
  WidgetLED led1(V7);
  WidgetLED led3(V3);
  WidgetLCD lcd(V13);
  BLYNK_CONNECTED() {
      Blynk.syncAll();
    } 
    
int alarm_on = 0;
int reset_cnt_dn = 60;
int tripcnt = 0;
int emaillimit = 0;
int cycle = 20;
String currentTime;
String currentDate;
boolean isactive = true;
unsigned int current_millis_value = 0;
unsigned int previous_millis_value = 0;
unsigned int seconds = 0.0;
unsigned int minutes = 0;
unsigned int hours = 0;
unsigned int m = 0;
unsigned long start_time;
unsigned long lasttime;
double half_second = 0.00;
    
void setup() {
  pinMode(D1, OUTPUT);  
  pinMode(D3, INPUT);     
  pinMode(D2, OUTPUT);
//  pinMode(D4, OUTPUT);
  pinMode(D5, INPUT);  
//  pinMode(D6, OUTPUT);     
  pinMode(D7, OUTPUT);
  pinMode(D8, OUTPUT);
  digitalWrite(D3, LOW);
  pinMode(pir, INPUT);

//  Blynk.begin(auth, "SSID", "PASSWORD","URL");

timer.setInterval(1000, onesecond); 
timer.setInterval(5000, fivesecond);
timer.setInterval(30000, thirtysecond);
timer.setInterval(1000, clockDisplay);
timer.setInterval(60000, alarmreset);  // 1 minute
timer.setInterval(120000,twominute); //

  while (Blynk.connect() == false) {
    // Wait until connected
}
  rtc.begin();  
}

void loop() {
  Blynk.run();
  timer.run(); 
//  update_time();
 
}
void onesecond (){
 
}
void fivesecond ()
{ Blynk.setProperty(V10,"color",BLYNK_GREEN); } 
void thirtysecond()
{  } 
void twominute()
{  }  
void clockDisplay()
{
  currentDate = String(month()) + "/" + day() + "/" +  year();
  char Date[16];
  char Time[16];

  sprintf(Date, "%02d/%02d/%04d", month(), day(),year());
  sprintf(Time, "%02d:%02d:%02d", hour(), minute(), second());
  // Send time to the App
  Blynk.virtualWrite(V10, String(Date)+"  "+String(Time));