TeamNewPipe / TeamNewPipe/NewPipeExtractor

High number of memory allocations when running JS

Open
#1,036 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement performance YouTube
Dominant language
Java
Stars
2k
Forks
602
Avg merge
3d 6h
Merged PRs (30d)
6

Description

When trying to decrypt the n parameter, we have to execute some JavaScript.

To do this currently, we create a new Rhino context each time, compile the function, and then run it while disabling optimizations.

What I think we should do is:

  • Store the context and function
  • Enable optimizations
  • Maybe make the entire thing generic? So any JS interpreter could be used.

ScreenShot from a profiler
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the code that decrypts the n parameter and currently creates, compiles, and runs a Rhino context. Measure its allocation behavior before and after preserving the context and function, enabling optimizations, and assessing whether interpreter use can be generalized. Done means repeated decryption no longer creates the same high allocation volume while retaining correct results.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.