Skip to content

Conversation

@vtjnash
Copy link
Member

@vtjnash vtjnash commented May 31, 2021

As Jeff noted recently, more fields can be moved to reduce the data size (I think removing .names had the biggest effect on sysimg size, but all seemed helpful). I've also packed some Bool fields too.

@vtjnash vtjnash requested a review from JeffBezanson May 31, 2021 02:07
@KristofferC
Copy link
Member

@nanosoldier runtests(ALL, vs = ":master")

Just curious about the "damage".

@nanosoldier
Copy link
Collaborator

Your package evaluation job has completed - possible new issues were detected. A full report can be found here. cc @maleadt

@vtjnash
Copy link
Member Author

vtjnash commented May 31, 2021

Looks like a couple "key" packages (SymbolServer, AxisArrays, JuliaInterpreter), but not a major impact.

function datatype_min_ninitialized(t::DataType)
isabstracttype(t) && return 0
if t.name === NamedTuple_typename
names, types = t.parameters[1], t.parameters[2]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just call fieldcount in this case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I guess not, since we want 0 instead of an error for abstract types...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that is why it is reimplemented here

STATIC_INLINE jl_sym_t *jl_field_name(jl_datatype_t *st, size_t i) JL_NOTSAFEPOINT
{
return (jl_sym_t*)jl_svecref(jl_field_names(st), i);
return st->name->names;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe assert here that it's not a named tuple?

Copy link
Member Author

@vtjnash vtjnash Jun 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured it would assert due to the null pointer anyways, so it was unnecessary to enforce it (edit: and it is also applicable to Tuple)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants