Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Testicular Slingshot
Alchemy Viewer
Commits
40f92721
Commit
40f92721
authored
Feb 20, 2020
by
Rye Mutt
🍞
Browse files
Optimize inventory fetch somewhat
parent
54f024f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
indra/newview/llinventorymodelbackgroundfetch.cpp
View file @
40f92721
...
...
@@ -569,8 +569,9 @@ void LLInventoryModelBackgroundFetch::bulkFetch()
bool
LLInventoryModelBackgroundFetch
::
fetchQueueContainsNoDescendentsOf
(
const
LLUUID
&
cat_id
)
const
{
for
(
fetch_queue_t
::
const_iterator
it
=
mFetchQueue
.
begin
();
it
!=
mFetchQueue
.
end
();
for
(
fetch_queue_t
::
const_iterator
it
=
mFetchQueue
.
begin
(),
end
=
mFetchQueue
.
end
();
it
!=
end
;
++
it
)
{
const
LLUUID
&
fetch_id
=
(
*
it
).
mUUID
;
...
...
@@ -660,10 +661,11 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res
// Instead, we assume success and attempt to extract information.
if
(
content
.
has
(
"folders"
))
{
LLSD
folders
(
content
[
"folders"
]
)
;
const
LLSD
&
folders
=
content
[
"folders"
];
for
(
LLSD
::
array_const_iterator
folder_it
=
folders
.
beginArray
();
folder_it
!=
folders
.
endArray
();
for
(
LLSD
::
array_const_iterator
folder_it
=
folders
.
beginArray
(),
folder_end
=
folders
.
endArray
();
folder_it
!=
folder_end
;
++
folder_it
)
{
LLSD
folder_sd
(
*
folder_it
);
...
...
@@ -685,11 +687,12 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res
if
(
parent_id
.
isNull
())
{
LLSD
items
(
folder_sd
[
"items"
]
)
;
const
LLSD
&
items
=
folder_sd
[
"items"
];
LLPointer
<
LLViewerInventoryItem
>
titem
=
new
LLViewerInventoryItem
;
for
(
LLSD
::
array_const_iterator
item_it
=
items
.
beginArray
();
item_it
!=
items
.
endArray
();
for
(
LLSD
::
array_const_iterator
item_it
=
items
.
beginArray
(),
item_end
=
items
.
endArray
();
item_it
!=
item_end
;
++
item_it
)
{
const
LLUUID
lost_uuid
(
gInventory
.
findCategoryUUIDForType
(
LLFolderType
::
FT_LOST_AND_FOUND
));
...
...
@@ -718,9 +721,10 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res
continue
;
}
LLSD
categories
(
folder_sd
[
"categories"
]);
for
(
LLSD
::
array_const_iterator
category_it
=
categories
.
beginArray
();
category_it
!=
categories
.
endArray
();
const
LLSD
&
categories
=
folder_sd
[
"categories"
];
for
(
LLSD
::
array_const_iterator
category_it
=
categories
.
beginArray
(),
category_end
=
categories
.
endArray
();
category_it
!=
category_end
;
++
category_it
)
{
LLSD
category
(
*
category_it
);
...
...
@@ -737,10 +741,11 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res
}
}
LLSD
items
(
folder_sd
[
"items"
]
)
;
const
LLSD
&
items
=
folder_sd
[
"items"
];
LLPointer
<
LLViewerInventoryItem
>
titem
=
new
LLViewerInventoryItem
;
for
(
LLSD
::
array_const_iterator
item_it
=
items
.
beginArray
();
item_it
!=
items
.
endArray
();
for
(
LLSD
::
array_const_iterator
item_it
=
items
.
beginArray
(),
item_end
=
items
.
endArray
();
item_it
!=
item_end
;
++
item_it
)
{
LLSD
item
(
*
item_it
);
...
...
@@ -762,9 +767,10 @@ void BGFolderHttpHandler::processData(LLSD & content, LLCore::HttpResponse * res
if
(
content
.
has
(
"bad_folders"
))
{
LLSD
bad_folders
(
content
[
"bad_folders"
]);
for
(
LLSD
::
array_const_iterator
folder_it
=
bad_folders
.
beginArray
();
folder_it
!=
bad_folders
.
endArray
();
const
LLSD
&
bad_folders
=
content
[
"bad_folders"
];
for
(
LLSD
::
array_const_iterator
folder_it
=
bad_folders
.
beginArray
(),
folder_end
=
bad_folders
.
endArray
();
folder_it
!=
folder_end
;
++
folder_it
)
{
// *TODO: Stop copying data [ed: this isn't copying data]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment