Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long startup delay in certain scenario #50

Open
MatthewScholefield opened this issue Mar 8, 2021 · 4 comments
Open

Long startup delay in certain scenario #50

MatthewScholefield opened this issue Mar 8, 2021 · 4 comments

Comments

@MatthewScholefield
Copy link

MatthewScholefield commented Mar 8, 2021

Problem Description

Sometimes when I would click a script widget I noticed the script would run a second time there would be a 1-3 second startup delay. Then experimented and narrowed it down to a specific situation.

Steps to reproduce

  • Use Oneplus Launcher
  • Close a recent app other than Termux
  • Immediately launch a Termux widget icon

Expected behavior
Script runs immediately.

Actual behavior
Delay of 1-5 seconds before launch.

Video: video link

  • Termux application version: 0.108
  • Android OS version: 11
  • Device model: Oneplus 8T
@RalfWerner
Copy link

A close look at your *.mp4 shows double tap. So I expect twice

@MatthewScholefield
Copy link
Author

Oh, haha, it's so subconscious I didn't even realize it. I guess it's just that oneplus launcher momentarily prevents the launching of apps after clearing another app from memory for some reason.

@MatthewScholefield
Copy link
Author

MatthewScholefield commented Mar 8, 2021

Actually, I realize the lag is exceptionally long, sometimes up to three seconds or so, but only for termux widget (all other ~20 apps I tried including Termux are still instant). To give more info to oneplus developers, I wonder, is there anything unique about how it launches? My only thought is that it sends a toast notification each launch and it might be related to that.

Edit: Reopened because of this followup

@MatthewScholefield MatthewScholefield changed the title Script runs twice in certain cases Long startup delay in certain scenario Mar 8, 2021
@RalfWerner
Copy link

RalfWerner commented Mar 8, 2021

I can not repeat that on any of my devices and not in my Android 11 emulators.
You deleted the source of your example! There where actions (.bashrc) that can contain a delay. The loop probably does not make it.
I have used another example that also echo$RANDOM, edited it withnanoand can be delayed terminatedexit 1(remove#)

a='#!';s=.shortcuts;mkdir $s;c=$s/check; echo "nano $c">$s/nano
printf '%s\n' "$a$PREFIX/bin/bash" 'echo rand:$RANDOM' '#exit 1'>$c

https://user-images.githubusercontent.com/45426380/110317253-2d208180-800c-11eb-91a9-c882c92ede3f.mp4
I don't know, why this*.mp4 video in github is not viewed, (your above works) but have it again as Dropbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants