Skip to content

Commit a04678c

Browse files
lsdkjf<
1 parent 7a2c48a commit a04678c

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

backend/src/backend/primary/user_session_proxy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ async def _create_new_job(self, user_id: str) -> None:
9292
# these could be dynamic based on e.g. the selected ensemble sizess by the user.
9393
json={
9494
"resources": {
95-
"limits": {"memory": "128GiB", "cpu": "16"},
96-
"requests": {"memory": "32GiB", "cpu": "4"},
95+
"limits": {"memory": "64GiB", "cpu": "4"},
96+
"requests": {"memory": "32GiB", "cpu": "2"},
9797
}
9898
},
9999
)

backend/src/backend/user_session/routers/surface/router.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ async def well_intersection_reals_from_user_session(
7070
for res in res_array:
7171
tot_mb += len(res) / (1024 * 1024)
7272
bytesios = [BytesIO(bytestr) for bytestr in res_array]
73-
xtgeofiles = [_XTGeoFile(bytestr) for bytestr in bytesios]
74-
test = [BytesIO(bytestr).read() for bytestr in res_array]
73+
# xtgeofiles = [_XTGeoFile(bytestr) for bytestr in bytesios]
74+
# test = [BytesIO(bytestr).read() for bytestr in res_array]
7575
elapsed_bytesio = timer.lap_s()
7676

77-
surfaces = [
78-
xtgeo.surface_from_file(bytestr, fformat="irap_binary") for bytestr in bytesios
79-
]
77+
# surfaces = [
78+
# xtgeo.surface_from_file(bytestr, fformat="irap_binary") for bytestr in bytesios
79+
# ]
8080
elapsed_xtgeo = timer.lap_s()
8181

8282
# surfaces2 = [
@@ -140,12 +140,8 @@ def read_header(buf):
140140

141141
def read_values_optimized(header, buf):
142142
stv = 100
143-
n_blocks = (len(buf) - stv) // (
144-
header["ncol"] * 4 + 8
145-
) # approximate number of blocks
146-
datav = np.empty(
147-
(header["ncol"] * n_blocks,), dtype=np.float32
148-
) # preallocated array
143+
n_blocks = (len(buf) - stv) // (header["ncol"] * 4 + 8)
144+
datav = np.empty((header["ncol"] * n_blocks,), dtype=np.float32) # preallocate
149145

150146
idx = 0
151147
while stv < len(buf):

0 commit comments

Comments
 (0)