fent / fent/node-ytdl-core

Please improve getBasicInfo's performance and ytdl's overall performance

Open
#997 9 comments 0 reactions 0 assignees View on GitHub
discussion feature
Dominant language
JavaScript
Stars
4.7k
Forks
852
PR merge metrics
No merged PRs in 30d

Description

### Before creating an issue, please try the following

- Are you on the latest version of ytdl-core?
Yes

I've noticed that getInfo uses ~850ms on average, and getBasicInfo uses ~500ms, the code i've used to test this is:

```js
const ytdl = require('ytdl-core');
const start = Date.now();
ytdl.getInfo('https://www.youtube.com/watch?v=HhjHYkPQ8F0').then(data => {
return Date.now() - start;
})
```
and
```js
const ytdl = require('ytdl-core');
const start = Date.now();
ytdl.getBasicInfo('https://www.youtube.com/watch?v=HhjHYkPQ8F0').then(data => {
return Date.now() - start;
})
```

I believe and hope that the performance of ytdl's getBasicInfo could get further optimized, or add some array-like options to choose what kind of information i want to extract, and not get the entire gigantic object which is quite slow

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.