<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:37:40 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[GODRIVER-2025] Always reuse buffers in bsonrw.valueWriter</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2025</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;Currently, a &lt;tt&gt;bsonrw.valueWriter&lt;/tt&gt; will use a new byte slice as the write buffer for each document written if one is passed in as the writer (if it is a &lt;tt&gt;SliceWriter&lt;/tt&gt;). The result is that the write buffer capacity must be grown many times, each resulting in an allocate-then-copy operation. Instead, we should reuse the write buffer for every document written, only allocating a new byte slice when flushing the full document from the buffer (or when the write buffer needs to grow).&lt;/p&gt;

&lt;p&gt;In the attached memory profile, observe that &amp;gt;75% of the allocations are in the &lt;tt&gt;bsoncore.Append*&lt;/tt&gt; functions which append to a byte slice buffer provided by &lt;tt&gt;bsonrw.valueWriter&lt;/tt&gt;. We should expect very few allocations in the &lt;tt&gt;bsoncore.Append*&lt;/tt&gt; functions once the buffer is grown the first time.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1756972">GODRIVER-2025</key>
            <summary>Always reuse buffers in bsonrw.valueWriter</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="matt.dale@mongodb.com">Matt Dale</assignee>
                                    <reporter username="matt.dale@mongodb.com">Matt Dale</reporter>
                        <labels>
                    </labels>
                <created>Tue, 25 May 2021 22:49:58 +0000</created>
                <updated>Mon, 25 Jul 2022 20:38:43 +0000</updated>
                            <resolved>Mon, 14 Jun 2021 23:32:43 +0000</resolved>
                                                    <fixVersion>1.6.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3877406" author="xgen-internal-githook" created="Mon, 14 Jun 2021 23:31:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Matt Dale&apos;, &apos;email&apos;: &apos;9760375+matthewdale@users.noreply.github.com&apos;, &apos;username&apos;: &apos;matthewdale&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-2025&quot; title=&quot;Always reuse buffers in bsonrw.valueWriter&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-2025&quot;&gt;&lt;del&gt;GODRIVER-2025&lt;/del&gt;&lt;/a&gt; Stop replacing the bsonrw.valueWriter buffer when given a SliceWriter destination. (#679)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/commit/4adb6d73ca0fe53c99e11765005f37033acd6471&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/commit/4adb6d73ca0fe53c99e11765005f37033acd6471&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="3843324" author="JIRAUSER1259527" created="Thu, 27 May 2021 01:33:39 +0000"  >&lt;p&gt;PR: &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/pull/679&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-go-driver/pull/679&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1400175">GODRIVER-1670</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="317136" name="memprofile-marshal-bson.out" size="8216" author="matt.dale@mongodb.com" created="Tue, 25 May 2021 22:48:56 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>GODRIVER-1693</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY23Q2</label>
            <label>FY23Q3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hz2edz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>