home / github / pull_requests

Menu
  • Search all tables
  • GraphQL API

pull_requests: 310361933

This data as json

id node_id number state locked title user body created_at updated_at closed_at merged_at merge_commit_sha assignee milestone draft head base author_association auto_merge repo url merged_by
310361933 MDExOlB1bGxSZXF1ZXN0MzEwMzYxOTMz 3250 closed 0 __slots__ 6213168 What changes: - Most classes now define ``__slots__`` - removed ``_initialized`` property - Enforced checks that all subclasses must also define ``__slots__``. For third-party subclasses, this is for now a DeprecationWarning and should be changed into a hard crash later on. - 22% reduction in RAM usage - 5% performance speedup for a DataArray method that performs a ``_to_temp_dataset`` roundtrip **DISCUSS:** support for third party subclasses is very poor at the moment (#1097). Should we skip the deprecation altogether? Performance benchmark: ```python import timeit import psutil import xarray a = xarray.DataArray([1, 2], dims=['x'], coords={'x': [10, 20]}) RUNS = 10000 t = timeit.timeit("a.roll(x=1, roll_coords=True)", globals=globals(), number=RUNS) print("{:.0f} us".format(t / RUNS * 1e6)) p = psutil.Process() N = 100000 rss0 = p.memory_info().rss x = [ xarray.DataArray([1, 2], dims=['x'], coords={'x': [10, 20]}) for _ in range(N) ] rss1 = p.memory_info().rss print("{:.0f} bytes".format((rss1 - rss0) / N)) ``` Output: | test | env | master | slots | |:-------------:|:---:|:----------:| ----------:| | DataArray.roll | py35-min | 332 us | 360 us | | DataArray.roll | py37 | 354 us | 337 us | | RAM usage of a DataArray | py35-min | 2755 bytes | 2074 bytes | | RAM usage of a DataArray | py37 | 1970 bytes | 1532 bytes | The performance degradation on Python 3.5 is caused by the deprecation mechanism - see changes to common.py. I honestly never realised that xarray objects are measured in kilobytes (vs. 32 bytes of underlying buffers!) 2019-08-23T12:16:44Z 2019-08-30T12:13:28Z 2019-08-29T17:14:20Z 2019-08-29T17:14:20Z 41fecd8658ba50ddda0a52e04c21cec5e53415ac     0 3fc792074c681fe9265a74f83567694ed8e08c4b aaeea6250b89e3605ee1d1a160ad50d6ed657c7e MEMBER   13221727 https://github.com/pydata/xarray/pull/3250  

Links from other tables

  • 0 rows from pull_requests_id in labels_pull_requests
Powered by Datasette · Queries took 80.28ms