Commit graph

3 commits

Author SHA1 Message Date
Steve Lee
b7cb335f03
Update copyright notice to latest guidance (#12190) 2020-03-24 11:08:37 -07:00
Ilya
cc6540b614
Cleanup style issues in CoreAdapter and MshObject (#9190) 2019-03-23 09:52:30 +05:00
Staffan Gustafsson
42c289fc8e Improve formatting performance by having better primitives on PSObject (#8785)
By not doing excessive amounts of extra work, formatting can be sped up quite significantly (about 8x faster).
The main change comes from adding new, more efficient, primitive to query an object for the existence of an instance member.
The formatting system has been checking for if an object has properties other than some decorated properties added by PS remoting, and it doesn't this by retrieving all properties which results in heavy allocations and wasted cycles.
By adding `GetFirstOrDefault` to `PSObject` and similar primitives to the underlying Adapters, we are able to return early, without having to get all properties back.
2019-03-20 18:43:52 -07:00