Skip to content

Comb the use points of isBlank() function to reduce unnecessary checks #123

@gosonzhang

Description

@gosonzhang

see #122

After I think about it, this PR reminds me that if the content of a string has been checked by isBlank() and the string still exists in memory, the next step is to do null judgment processing, which should only be isEmpty(), so as to improve the overall processing performance.

Next, I will comb the call points of the isBlank() function, and check the contents that have been checked by isBlank(). When checking again, I'll use isEmpty() instead to reduce unnecessary checking


考虑这个PR之后,我觉得当前使用isBlank()有些地方需要整理一下:如果一个字符串的内容已经被isBlank()检查过,并且字符串仍然存在于内存中,下一步做isBlank()判断处理的地方可以是isEmpty(),从而提高整个处理性能。

接下来,我将梳理isBlank()函数的调用点,并检查isBlank()检查的内容,使用isEmpty()来减少不必要的检查

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions