Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
e7c975b2
Commit
e7c975b2
authored
3 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Add LLMessageSystem::hasFast to avoid excessive mutex locks and string finds
parent
bd1a5b81
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llmessage/message.cpp
+5
-0
5 additions, 0 deletions
indra/llmessage/message.cpp
indra/llmessage/message.h
+1
-0
1 addition, 0 deletions
indra/llmessage/message.h
with
6 additions
and
0 deletions
indra/llmessage/message.cpp
+
5
−
0
View file @
e7c975b2
...
@@ -3962,6 +3962,11 @@ BOOL LLMessageSystem::has(const char *blockname) const
...
@@ -3962,6 +3962,11 @@ BOOL LLMessageSystem::has(const char *blockname) const
return
getNumberOfBlocks
(
blockname
)
>
0
;
return
getNumberOfBlocks
(
blockname
)
>
0
;
}
}
BOOL
LLMessageSystem
::
hasFast
(
const
char
*
blockname
)
const
{
return
getNumberOfBlocksFast
(
blockname
)
>
0
;
}
S32
LLMessageSystem
::
getNumberOfBlocksFast
(
const
char
*
blockname
)
const
S32
LLMessageSystem
::
getNumberOfBlocksFast
(
const
char
*
blockname
)
const
{
{
return
mMessageReader
->
getNumberOfBlocks
(
blockname
);
return
mMessageReader
->
getNumberOfBlocks
(
blockname
);
...
...
This diff is collapsed.
Click to expand it.
indra/llmessage/message.h
+
1
−
0
View file @
e7c975b2
...
@@ -726,6 +726,7 @@ class LLMessageSystem : public LLMessageSenderInterface
...
@@ -726,6 +726,7 @@ class LLMessageSystem : public LLMessageSenderInterface
void
sanityCheck
();
void
sanityCheck
();
BOOL
has
(
const
char
*
blockname
)
const
;
BOOL
has
(
const
char
*
blockname
)
const
;
BOOL
hasFast
(
const
char
*
blockname
)
const
;
S32
getNumberOfBlocksFast
(
const
char
*
blockname
)
const
;
S32
getNumberOfBlocksFast
(
const
char
*
blockname
)
const
;
S32
getNumberOfBlocks
(
const
char
*
blockname
)
const
;
S32
getNumberOfBlocks
(
const
char
*
blockname
)
const
;
S32
getSizeFast
(
const
char
*
blockname
,
const
char
*
varname
)
const
;
S32
getSizeFast
(
const
char
*
blockname
,
const
char
*
varname
)
const
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment