-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 904a996
Showing
9 changed files
with
252 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# compiled output | ||
/dist | ||
/node_modules | ||
/build | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
pnpm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# OS | ||
.DS_Store | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# temp directory | ||
.temp | ||
.tmp | ||
|
||
# EdgeDB Generated | ||
/dbschema/edgeql-js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# EdgeQL Query Builder (possibly) excessive build time and memory Issues | ||
|
||
This repository has been created to demonstrate the excessive memory consumption when transpiling the edgeql-js. | ||
|
||
| | | | ||
|---|---| | ||
| **OS** | Windows 11 | | ||
| **Node** | 20.14.0 | | ||
|
||
```bash | ||
npm install | ||
npm run db:reset | ||
npx tsc index.ts | ||
``` | ||
|
||
Observe that the build takes quite a long time and the memory usage climbs into 4GB+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module default { | ||
type Participant { | ||
exchange := .<participants[is Exchange]; | ||
} | ||
|
||
type Exchange { | ||
multi participants: Participant; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CREATE MIGRATION m1hy42f2fzrg5h6v4ujyp7tukm4kxighqffyzyelz6vyputmv7zksq | ||
ONTO initial | ||
{ | ||
CREATE TYPE default::Exchange; | ||
CREATE TYPE default::Participant; | ||
ALTER TYPE default::Exchange { | ||
CREATE MULTI LINK participants: default::Participant; | ||
}; | ||
ALTER TYPE default::Participant { | ||
CREATE LINK exchange := (.<participants[IS default::Exchange]); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[edgedb] | ||
server-version = "5.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import e from './dbschema/edgeql-js'; | ||
import * as edgedb from 'edgedb'; | ||
|
||
const query = e.select(e.Exchange, () => ({ | ||
...e.Exchange['*'] | ||
})); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "edgedb-js-mem-test", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"scripts": { | ||
"db:gen": "npx @edgedb/generate edgeql-js", | ||
"db:init": "edgedb project init --server-instance edgedb_js_mem_test --non-interactive && edgedb configure set listen_addresses 127.0.0.1 ::1 && npm run db:migrate", | ||
"db:migrate": "edgedb migration create && edgedb migrate && npm run db:gen", | ||
"db:destroy": "edgedb instance destroy -I edgedb_js_mem_test --force", | ||
"db:reset": "npm run db:destroy && npm run db:init" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"description": "", | ||
"dependencies": { | ||
"edgedb": "^1.5.7" | ||
}, | ||
"devDependencies": { | ||
"@edgedb/generate": "^0.5.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2021", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ | ||
"module": "commonjs", /* Specify what module code is generated. */ | ||
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ | ||
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ | ||
"strict": true, /* Enable all strict type-checking options. */ | ||
"skipLibCheck": true, /* Skip type checking all .d.ts files. */ | ||
"outDir": "./dist", | ||
"baseUrl": "./", | ||
} | ||
} |