althonos / althonos/InstaLooter

Why does execution (media collection) speed decrease when timeframe parameter is applied?

Aberta
#295 1 comentário 0 reações 0 responsáveis Ver no GitHub
bug question
Linguagem predominante
Python
Estrelas
2.1k
Forks
257
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

## Library version

*What's the installed library version ? Check with `instalooter --version`*:

```
instalooter v2.4.3
```

## Environment

*Describe here your environment, including:*

* *Python 3.7.6*

## Error description - runtime

I found out that hashtaglooter goes through medias in a reverse chronological order; that is, collection starts from the most recent media with the target keyword used as hashtag. However, when timeframe parameter is applied, as "**for media in looter.medias(timeframe=(starttime, endtime))**", the collection speed dramatically decreases.

When I checked the collected medias, I was able to found out that the collection is not done in a reverse chronological order but rather in a random order. Therefore, I want to know why this collection order changes with the timeframe parameter and how I can keep the collection speed as fast as the no-parameter case.

### Reproducible test case

```python
looter = HashtagLooter(keyword)
time_filter = (start_time, end_time)

for media in looter.medias(timeframe = time_filter):
...
```

### Expected behaviour

I'm expecting this to have the same collection speed with "for media in looter.medias():"

### Actual behaviour

However, the run speed gets dramatically slower with the timeframe parameter being applied.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.