Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share blank nodes #3418

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Share blank nodes #3418

wants to merge 2 commits into from

Conversation

nieqiurong
Copy link
Contributor

In the memory analysis, it was found that there were some blank nodes in mybatis,
Some are line breaks followed by blank strings, which are considered as blank nodes. However, the space occupied by these nodes is meaningless, and it is possible to cache these blank nodes during parsing and only retain one instance

example:

<script>
select * from user
<where>
<if test="1==1">and id = 1</if>
<if test="1==1">and id > 0</if>
</where>
</script>

For example, when parsing the sample script, four line break tags will be created. This is just a simple example, and we will use more dynamic tags in the project.

This modification will not change the original script content.

image

@coveralls
Copy link

coveralls commented Feb 22, 2025

Coverage Status

coverage: 87.223% (-0.003%) from 87.226%
when pulling e98369d on nieqiurong:202502222213
into a204ffa on mybatis:master.

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.

2 participants