Importing certain databases from zip are extremely slow
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- typescript, vscode
- Bereich
- tooling
Rechercherichtung
Beginne damit, den Datenbank-Importpfad und den aktuellen Streaming-Unzipper nachzuverfolgen, und vergleiche anschließend das Lesen von Datei-Headern mit der Suche im Zentralverzeichnis für Archive mit vielen kleinen Dateien. Erreicht ist das Ziel, wenn große Datenbankarchive deutlich schneller importiert werden und Archive mit fehlerhaften Datei-Headern weiterhin verarbeitet werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I can't share the database because it is private, but this database is less than 1GB zipped and about 3.4GB unzipped. Importing this database took over 1.5 hours to completion. I think the problem has to do with the fact that there are over 100,000 source files. First, these files need to be unzipped and placed in a directory. Then we need to re-zip them into a src.zip file. Our current unzipper library uses streaming, but it does read each file into memory separately.
It's possible that the slowness is exacerbated by the fix here: https://github.com/github/vscode-codeql/issues/622. Rather than read the zip in a single pass, we read the zips central directory and then grab each file based on what we find there.
I implemented this fix because some archives do not have correct file headers. The central directory is the source of truth and it exists at the end of the file. This happens when a zip file is updated after it is created.
Most of the time reading the file headers will be correct (except when they aren't). And that is likely faster than the central directory approach, especially when there are lots of small files. So, one possible solution would be to try reading via the file headers first and if that fails, fall back to the central directory.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 539
- Forks
- 240
- Ø Merge
- 2 T. 18 Std.
- Gemergte PRs (30 T.)
- 37
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/vscode-codeql
-
bug VSCode
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
github/vscode-codeql#4471 · 1 Kommentar ·
-
bug enhancement VSCode
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
github/vscode-codeql#592 · 2 Kommentare ·
-
enhancement VSCode
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
github/vscode-codeql#4432 · 1 Kommentar ·
-
bug VSCode
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 64/100
github/vscode-codeql#4339 · 1 Kommentar ·
Alle Issues in github/vscode-codeql
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
bug v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
modelcontextprotocol/inspector#2458 · 1 Kommentar ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
carbon-design-system/ibm-products#9907 ·